summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce subdivide_tukey apodizationMartijn van Beurden2022-08-197-30/+172
| | | | | | | | | | | | | | | Subdivide_tukey is intended to replace partial_tukey and punchout_tukey. It works in rougly the same way, but uses a more efficient algorithm, recyling more data. subdivide_tukey has 2 arguments, of which 1 is optional. The first states the maximum number of parts the signal has to be split up in, the second is the tukey parameter, divided by the max num of parts. subdivide_tukey(3) analyses audio with an unsplit block, with the block split in 2 and split in 3. Here the default p of 0.5 applies to the smallest parts, so the unsplit block effectively has a p of 0.5/3. subdivide_tukey(3/2e-1) does the same but with p of 0.2.
* Prepare oom checking in fuzzingMartijn van Beurden2022-08-192-0/+3
| | | | By merging oom checking in fuzzing in steps, it is possible to implement it without having oss-fuzz build failures
* Add configure option to not build programsMartijn van Beurden2022-08-132-2/+10
|
* Remove really old --explain text and reflow to fit 80 charsMartijn van Beurden2022-08-101-25/+21
| | | | | There was some help text in `flac --explain` which hasn't been correct for about 20 years already. This is removed, the rest of the text is reflowed to fit 80 chars standard terminal width
* Convert docbook to markdownMartijn van Beurden2022-08-0913-3873/+1026
| | | | | | | | | Currently, the man pages are converted from a docbook document, but the conversion doesn't seem very reliable. Also, the man page is more-or-less duplicated by the html documentation. This commit moves all tool documentation to a markdown document which is readable by itself and can be converted by pandoc to a man page and can be used by Jekyll to populate the website.
* Move changelog to markdown and top directory, add changes in gitMartijn van Beurden2022-08-084-1646/+914
|
* Fix HAVE_GETAUXVAL check for FreeBSD (#410)pkubaj2022-08-071-1/+1
| | | FreeBSD doesn't have getauxval().
* Fix and warning for MSVC with Windows XP toolset (#399)Martijn van Beurden2022-08-062-1/+30
| | | | A warning and a small workaround is added for building libFLAC on MSVC with a specific Windows XP targeting toolset.
* [CMake] Don't search for libiconv and libintl on WindowsMartijn van Beurden2022-08-012-3/+7
| | | | | The functions these libs provide don't seem to be used on Windows anyway. This fixes https://github.com/xiph/flac/issues/249
* Fix decoding of 33 bps constant subframeMartijn van Beurden2022-07-311-3/+10
|
* Also add trailing nul to empty vorbis comment entriesMartijn van Beurden2022-07-283-19/+35
| | | | | | | This might fix https://github.com/xiph/flac/issues/48 I cannot check as I don't have a file to test with. Besides returning an empty string upon reading, also allocate empty strings when growing vorbiscomments
* Check for vorbis comment entry being not null in fuzzerMartijn van Beurden2022-07-281-7/+12
|
* Finish porting guideMartijn van Beurden2022-07-274-18/+59
|
* Add porting guide stubMartijn van Beurden2022-07-271-0/+50
|
* Bulk update copyright dates to 2022Martijn van Beurden2022-07-26271-292/+292
|
* Add FMA intrinsics for autocorrelation calculationMartijn van Beurden2022-07-257-9/+130
| | | See https://github.com/xiph/flac/pull/387 for details
* Include stddef.h in compat.hMartijn van Beurden2022-07-191-1/+3
| | | | | | | See https://github.com/xiph/flac/issues/76 for details Also, move include of stddef.h and stdarg.h up to top of file to make clear that they are included unconditionally
* Fix rolled up version of lpc_restore_signal_wideMartijn van Beurden2022-07-171-1/+1
| | | | This fixes https://github.com/xiph/flac/issues/393
* Improve tempfile generation of fuzzer_metadataMartijn van Beurden2022-07-161-13/+4
|
* Re-add check for block alignMartijn van Beurden2022-07-161-20/+4
| | | | | | | | In 2003, in commit 94f81b0, a check was added for the block align field in WAVE. If it contradicts other parts of the header, an error was raised. This was (probably erroneously) made inactive with #if 0 in commit 13c63e4. This commit reactivates the check and removes the rest of the inactivated code.
* Eliminate race conditions in fuzzer_metadata file accessMartijn van Beurden2022-07-151-20/+34
| | | | See https://github.com/google/oss-fuzz/issues/8006 for details
* Revert "Enable encoder to use INT32_MIN as residual value" (#389)Martijn van Beurden2022-07-137-112/+73
| | | | | | | This reverts commit 7e0a0e572305e9004a6fa9bba3dd6be936553b03, following the change to the FLAC format proposed here: https://github.com/ietf-wg-cellar/flac-specification/pull/148 It turns out supporting use of INT32_MIN is quite a hassle.
* Only search for backslash in filename on WindowsMartijn van Beurden2022-07-131-0/+2
|
* Check first metadata block is streaminfo in level 1 metadata iteratorMartijn van Beurden2022-07-071-1/+9
| | | | | | | | | In simple_iterator_prime_input_ there was no check whether the first metadata block is a streaminfo block. As the rest of the functions operate under the assumption the first block is a streaminfo block, for example to prevent the functions from deleting the last block and being left with an iterator pointing nowhere, this check is added.
* Check chain length Ogg FLAC fileMartijn van Beurden2022-07-071-0/+6
| | | | | | | When a metadata chain was read from an Ogg FLAC file containing no metadata (but otherwise valid), an empty chain could be returned, leading to null derefencing on trying to manipulate it. This commit adds a check for the chain length
* Fix dereferencing of null pointer in metadata_iterators.cMartijn van Beurden2022-07-071-20/+23
|
* Add limits to metadata readingMartijn van Beurden2022-07-071-0/+8
| | | | | | In commit 0077d3b checks were added for metadata reading in the stream decoder. However, the metadata interface suffers from the same problems. Similar to the mentioned commit, checks are added.
* Add fuzzer_metadataMartijn van Beurden2022-07-073-1/+494
|
* Enable encoder to use INT32_MIN as residual valueMartijn van Beurden2022-07-017-73/+112
| | | | | | As abs(INT32_MIN) is undefined, it took some extra work to enable the encoder to do this. While expected gains are zero, this is done to ensure full spec coverage in this regard
* Small fixes needed for 32-bit capability (#379)Martijn van Beurden2022-07-013-17/+15
| | | | | * Change replaygain analysis so it is able to handle 32-bit PCM * Increase FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE to 32 * Fix switch-case fallthrough
* Add INT64_MAX limit to seekpointsMartijn van Beurden2022-06-291-2/+5
| | | | | | | | | | FLAC seekpoints are coded in unsigned 64-bit ints, but the code handling them uses signed 64-bit ints. Since users are unlikely to run into this limit anyway, do not use seekpoints larger than INT64_MAX Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48112
* Change eof handing in seeking codeMartijn van Beurden2022-06-291-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3fc5ba4 replaced a seeking error with specific handling. This handling consisted of lowering the upper seek bound. However, this handling was both slow and wrong. Because it is slow it causes fuzzing timeouts. It was wrong in that if there was another valid frame in the boguss frame being read, it would no longer be reachable. This commit replaces the handling with another approach: instead of lowering the upper bound, the lower bound is raised. With this, the calculation of pos for the next seek is changed and the seeking code hopefully ends up somewhere not decoding the bogus frame. If in decoding the frame at lower bound eof is still reached, a seek error is thrown. This is reasonable, as lower bound should be after the end of the last frame (not somewhere halfway a frame) and if a corrupt frame is encountered, proper seeking cannot be reasonably expected. It could be argued that it is still possible to try and lower the upper bound by trying to decode a frame by moving one byte backward at a time, looking for a frame, but this will probably cause fuzzer timeouts and as said, proper seeking in such a stream cannot be reaonably expected. Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48077
* Improve foreign metadata handlingMartijn van Beurden2022-06-2810-38/+132
| | | | | | Add options --keep-foreign-metadata-if-present and improve error messages when on decoding the wrong type of foreign metadata is found.
* Always take compression level as first compression settingMartijn van Beurden2022-06-271-3/+10
| | | | | | | Without this patch, the order of the arguments matter, with it it does not: specific compression settings now always override the more generic compression levels. This fixes issue https://github.com/xiph/flac/issues/20
* Increase max bitreader size to max metadata block sizeMartijn van Beurden2022-06-261-3/+5
| | | | This fixes https://github.com/xiph/flac/issues/370
* Fix CMake builds with -DBUILD_CXXLIBS=OFF (#360)Cameron Cawley2022-06-241-1/+4
|
* Do not add channel mask to vorbis_comment that will be reused laterMartijn van Beurden2022-06-242-2/+6
| | | | This fixes https://github.com/xiph/flac/issues/376
* Fix assertion failure in seek_to_absolute_sample_Martijn van Beurden2022-06-151-16/+10
| | | | | | | | | | On fuzzing the assertion 'decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER' failed. This was because it was possible to get there without having decoded a valid frame yet. The checks are rearranged such that the code past this assertion is only reached after it is made sure a valid frame has been decoded.
* Fix bitreader bug, leaving bitreader in undefined stateMartijn van Beurden2022-06-151-1/+14
| | | | | | | | | | | When a call to read_callback failed in bitreader_read_from_client_ it left the bitreader buffer in a state where the last word was swapped for endianness. While this wasn't ever a problem, recently code was merged that rewound the bitreader in case a bogus frame was found. If this happened, the bitreader buffer would be used in the state where the last word in the buffer was still swapped. This commit restores the last word of the buffer in case the call to the read callback fails
* Fix two timeouts when decoding oggMartijn van Beurden2022-06-151-1/+8
| | | | | | Fuzzing found timeouts occuring when processing garbage input with the decoder trying to decode or seek in it assuming it to be an ogg stream
* Add check for unsigned integer underflow in seeking codeMartijn van Beurden2022-06-151-1/+6
|
* Add new decoder fuzzer, mostly to cover seekingMartijn van Beurden2022-06-153-1/+180
| | | | | This second decoder fuzzer dumps the fuzz input to a file, which enables testing of seeking code
* Remove draft designation from isoflac.txtMartijn van Beurden2022-06-141-1/+1
|
* Add stats to encoder fuzzer on verify failureMartijn van Beurden2022-06-121-0/+6
|
* Add 32-bit files to testMartijn van Beurden2022-06-122-8/+114
|
* Add 32-bit encoding, including limiting of residual to 32-bit intMartijn van Beurden2022-06-1212-85/+594
|
* Add 32-bit decoding capabilityMartijn van Beurden2022-06-1212-108/+377
| | | | | | Decoding for 32-bit files is added, including the ability to decode a 33-bit side subframe. However, residuals are assumed to be limited to a 32-bit signed int, the encoder must make sure of this
* Change fuzzer_encoder_v2 timeout preventionMartijn van Beurden2022-06-111-8/+25
|
* Check found metadata in decoder fuzzerMartijn van Beurden2022-06-101-0/+27
| | | | This greatly improves code coverage
* Remove obsolete ci/flac-autotool.shRalph Giles2022-05-301-17/+0
| | | | | | | | | | I think this is from the jenkins era. For a while we tried to consolidate continuous-integration build descriptions across services, but the formats are different enough that it's been easier to use separate, per-service implementations. In any case, this isn't used any more so there's no reason to keep it around.