Commit Graph

3472 Commits

Author SHA1 Message Date
Erik de Castro Lopo 0e11f73eab Version 1.3.1 final. 2014-11-27 14:04:48 +11:00
Erik de Castro Lopo 585f00a371 Scripts/cross-build-win-binaries.mk : Add a 'clean' target. 2014-11-27 14:04:08 +11:00
Erik de Castro Lopo 5a365996d7 src/libFLAC/stream_decoder.c : Fail safely to avoid a heap overflow.
This fix is closely related to the fix for CVE-2014-9028. When that
fix went public Miroslav Lichvar noticed a similar potential problem
spot in the same function and was able to craft a file to trigger a
heap write overflow.

Reported-by : Miroslav Lichvar <mlichvar@redhat.com>
2014-11-27 13:40:37 +11:00
Erik de Castro Lopo 71b5c02870 examples/*/Makefile.am : Add CLEANFILES line to remove Windows .exe files. 2014-11-27 13:40:37 +11:00
Erik de Castro Lopo 1a7c3fa488 tests/*.sh : Switch back to /bin/sh.
Jan Stary reported that on OpenBSD bash isn't located in /bin/
which means that the test fail. He also noted that there didn't
seem to be anything bash specific in the tests.

This patch takes some suggestions from Jan, plus a few fixes tested
on Debian using the bin/sh provided by bash and dash.

Suggested-by: Jan Stary <hans@stare.cz>
2014-11-27 13:12:17 +11:00
Erik de Castro Lopo fe494d2dc2 changelog.html : Minor corrections in decoding speed entry. 2014-11-27 09:08:47 +11:00
Erik de Castro Lopo e0a0c063a7 Normalize some copyright dates strings.
This will make it easier to simply search and replace.
2014-11-27 08:25:31 +11:00
Martijn van Beurden 3bc649de34 Some last copyright year updates and change to open bug list
This updates one rather important mention of the copyright year
(the encoding/decoding progress display) and a few in the
documentation. Furthermore, it updates the open bug list

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-27 08:16:34 +11:00
Erik de Castro Lopo 50262f5861 Fix two un-related typos. 2014-11-26 20:42:15 +11:00
Erik de Castro Lopo b147b73eab test/test_compression.sh : Fix for OSX.
On Mac OSX, the 'wc -c' command returns a number with leading whitespace
which then results in a syntax error when the shell parser expects a
number when it really has a string containing a number. The easy fix is
to use string interpolation.

Closes: https://sourceforge.net/p/flac/bugs/420/
Reported-by: Mark Harris <mark.hsj@gmail.com>
2014-11-26 16:29:29 +11:00
Erik de Castro Lopo ff8a74aa70 Scripts/cross-build-win-binaries.mk : Strip the binaries. 2014-11-26 08:04:58 +11:00
Erik de Castro Lopo ccdd8fe275 libFLAC/format.c : Fix the date in FLAC__VENDOR_STRING. 2014-11-26 08:03:34 +11:00
Erik de Castro Lopo 39d9791b03 More date fixes. 2014-11-25 20:02:22 +11:00
Erik de Castro Lopo b83ee75363 Set version to 1.3.1pre1. 2014-11-25 19:10:31 +11:00
Erik de Castro Lopo 6a737a1270 Add file Scripts/cross-build-win-binaries.mk. 2014-11-25 19:10:31 +11:00
Erik de Castro Lopo bef7381c98 Makefile.am : EXTRA_DIST should contain FLAC-vs2005.sln. 2014-11-25 14:42:36 +11:00
Erik de Castro Lopo 1437391577 Update copyright years to include 2014. 2014-11-25 13:04:30 +11:00
Erik de Castro Lopo fcf0ba06ae src/libFACL/stream_decoder.c : Fail safely to avoid a heap overflow.
A file provided by the reporters caused the stream decoder to write to
un-allocated heap space resulting in a segfault. The solution is to
error out (by returning false from read_residual_partitioned_rice_())
instead of trying to continue to decode.

Fixes: CVE-2014-9028
Reported-by: Michele Spagnuolo,
             Google Security Team <mikispag@google.com>
2014-11-25 13:03:55 +11:00
Erik de Castro Lopo 288edbb3a1 doc/html/changelog.html : Add attributions and fix a typo. 2014-11-24 21:54:34 +11:00
Erik de Castro Lopo e09ff328d4 doc/html/changelog.html : Update for 1.3.1 release. 2014-11-24 21:10:27 +11:00
Erik de Castro Lopo b7017d61a1 Rename Visual Studio solution files.
* FLAC-vs2010.sln -> FLAC.sln
* FLAC.sln -> FLAC-vs2005.sln
2014-11-24 06:06:14 +11:00
Erik de Castro Lopo 93846ee223 examples/c/decode/file/main.c : Add extra error handling.
Michele Spagnuolo provided a file that initially had frames with two
channels but then had a frame with a single channel. This example
program only supports exactly two channels and previously had
insufficient validation.

Closes: https://sourceforge.net/p/flac/bugs/418/
Reported-by: Michele Spagnuolo,
             Google Security Team <mikispag@google.com>
2014-11-20 21:46:57 +11:00
Erik de Castro Lopo 5b3033a2b3 src/libFLAC/stream_decoder.c : Fix buffer read overflow.
This is CVE-2014-8962.

Reported-by: Michele Spagnuolo,
             Google Security Team <mikispag@google.com>
2014-11-20 21:46:39 +11:00
Martijn van Beurden d8d171705a libFLAC: fix more problems with new window functions
This fixes two problems with handling of out-of-bounds arguments
for the window functions, one of which involving an infinite loop

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-16 09:11:02 -08:00
Erik de Castro Lopo 9971e7057d Improve description of encoding preset equivalents.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-11-15 09:19:22 -08:00
Erik de Castro Lopo 7efe8f3bb5 metadata_iterators.c : Set status when metadata itereator is not writable.
The status should be FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT.

Closes: http://sourceforge.net/p/flac/patches/50/
2014-11-14 23:35:45 -08:00
Martijn van Beurden cdff952fd8 libFLAC : Add more checks to partial_tukey and punchout_tukey windows.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-13 20:16:26 -08:00
Erik de Castro Lopo b7d13c0716 include/share/endswap.h : Fix usage of HAVE_BSWAP16.
The code was incorrectly using #ifndef on a value that was always defined
to a value of either 0 or 1.
2014-11-12 07:06:20 -08:00
Martijn van Beurden 3af2f2b39c Update documentation for new compression presets
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-11 06:20:43 -08:00
Martijn van Beurden 3d800a5775 Make test_compression a little more forgiving
The retune of compression levels makes this test fail. This is due
to a few approximations used in the encoder that determine which
LP coefficient should result in the smallest file. Differences are
usually very small, but in my case this resulted in compression
level 6 giving a 3 byte bigger file.

This patch lets the compression test pass even if the a compression
level results in a file that is up to 10 byte larger than the
previous level

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-11 06:20:08 -08:00
Martijn van Beurden 02891daa7a Retune FLAC compression levels
This patch changes a the settings associated with compression
levels 6, 7 and 8. With this patch, -e is no longer used, but
instead apodization functions are added. This should improve
compression with at least 95% of all material while not changing
the speed much. Decoding ways, 6 and 8 stay the same, and 7 is
slowed a bit, which makes it as fast as 8.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-11 06:19:23 -08:00
Ralph Giles 69c2318b7b Fix indenting on the bswap32 autoconf macro.
We generally prefer spaces to tabs.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-04 21:18:48 -08:00
Ralph Giles 87408b3661 Clean up bswap32 autoconf macro.
Improve 'checking' message and don't hog the cache namespace.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-04 21:18:48 -08:00
Ralph Giles 7a671e7c41 Use a configure check for bswap16 instead of gcc version #ifdefs.
Fixes a build problem on apple clang.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-04 21:18:48 -08:00
Ralph Giles 1f30b3e711 Add autoconf macro to check for the bswap16 intrinsic.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-11-04 21:18:48 -08:00
Erik de Castro Lopo e0fbe71935 stream_encoder.c : Add apodization field to CompressionLevels struct.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-16 08:25:33 +11:00
Erik de Castro Lopo d2de3a1a19 autogen.sh : Use long names for options to autoreconf. 2014-10-16 08:25:29 +11:00
Erik de Castro Lopo f0a17e965b libFLAC/fixed_intrin_sse2.c : Fix comments.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-07 06:34:21 +11:00
Erik de Castro Lopo 11b5d51b63 Add AVX2 CPU support stream encoder.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-04 09:42:57 +10:00
Erik de Castro Lopo a75b870592 Add AVX/AVX2/FMA support to CPU detection code.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-04 09:14:21 +10:00
Erik de Castro Lopo ad2ae45bb7 libFLAC/stream_encoder.c : Reduce about of hackery.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-04 09:13:10 +10:00
Erik de Castro Lopo 35c14b10a4 Refactoring and simplifying of CPU detection.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-04 09:05:15 +10:00
Erik de Castro Lopo 7cb032c322 Remove support for AMD's 3Dnow.
AMD stopped release new chips withe 3DNow in 2010.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-04 09:01:36 +10:00
Erik de Castro Lopo 347afd878c src/libFLAC/window.c : Add 'f' to float literals to avoid compiler warnings.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-10-03 06:51:43 +10:00
Erik de Castro Lopo d66f6754bf src/flac/decode.c : Decoder buffering improvements on Windows.
On Windows, decoding flac files is also prone to producing fragmented
files. Avoid fragmentation on NTFS by using Windows specific functions to
tell Windows the size of the file beforehand.

Patch-from: Janne Hyvärinen <cse@sci.fi>
2014-10-03 06:45:28 +10:00
Erik de Castro Lopo e863247777 stream_encoder.c : Only set 10MB output buffer on _WIN32.
Commig 6a6207b52a set the size of the encoder output buffer to 10MB
but this fix is really only needed on Windows, so wrap it in an #ifdef.
2014-09-29 09:06:37 +10:00
Erik de Castro Lopo 25db9b2cce Improve malformed vorbiscomment handling.
A few minor tweaks on a patch from Janne Hyvärinen <cse@sci.fi>.

fixup
2014-09-27 09:28:45 +10:00
Erik de Castro Lopo cf780068de metaflac : Fix typo in error message.
Patch-from: Janne Hyvärinen <cse@sci.fi>
2014-09-26 06:28:49 +10:00
Erik de Castro Lopo cf732a8e86 libFLAC/cpu.c : Refactor for readability.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-09-24 06:41:59 +10:00
Erik de Castro Lopo 6a6207b52a stream_encoder.c : Give the encoder a larger stdio buffer.
Windows in particular can experience slow encoding speeds on highly
fragmented disks. Using setvbuf to increase the size of the buffer to
10Meg.

This is probably not needed on Linux/Unix, but is very unlikely to
to cause any negative effects.

Patch-from: Janne Hyvärinen <cse@sci.fi>
2014-09-24 06:35:17 +10:00