Commit Graph

4462 Commits

Author SHA1 Message Date
Martijn van Beurden ce91056644 Work around i386 ASAN fseek bug
For some reason, i386 ASAN's fseek does not have large file
support, and off_t is actually a 32-bit int
2024-07-25 18:01:02 +02:00
Martijn van Beurden e50c876a1c Do not try to apply replaygain when bps changes
Credit: Oss-Fuzz
Issue: N/A
2024-07-25 18:01:02 +02:00
Martijn van Beurden 33b9a4a765 Work around i386 ASAN null pointer bug
For some reason, i386 ASAN does not copy a pointer somewhere in the
code. Using gdb I get a mention of a synthetic pointer, so perhaps
the compiler instrumented with ASAN thinks this pointer isn't
used. Anyway, commit adds a check for that null pointer which
isn't necessary otherwise and is only activated for i386 ASAN.

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58524
2024-07-25 18:01:02 +02:00
Martijn van Beurden 215d1aa633 Do not try to apply replaygain when bps < 4 or bps > 24 2024-07-23 16:45:53 +02:00
Martijn van Beurden defad5b544 Turn replaygain application off when impossible
Addition to commit 808efb3. That commit threw a warning, but did
not actually turn off replaygain application.

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70482
2024-07-23 16:45:53 +02:00
Martijn van Beurden 8c244b8389 Add level 0 Ogg reading capability to tests and docs 2024-07-18 08:16:39 +02:00
Martijn van Beurden f94d34ffba Enable MD5 checking of input when reencoding to stdout 2024-07-18 08:16:39 +02:00
Martijn van Beurden 3adb645559 Enable level 0 metadata interface to read Ogg files too 2024-07-18 08:16:39 +02:00
Martijn van Beurden a9306bb390 Check that MD5 sums are the same when re-encoding FLAC file 2024-07-18 08:16:39 +02:00
Martijn van Beurden ef35c28dfd
Fix printing of usage_error (#727)
This was missed in commit dda3e77
2024-07-16 11:24:12 +02:00
Martijn van Beurden 3468459d44
Fix endless loop in foreign metadata handling (#725)
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58545
2024-07-14 19:48:41 +02:00
Martijn van Beurden d48b689ae8 Enable fuzzing of writing foreign metadata back on decoding
The output file was deleted before writing back foreign metadata
could take place, making that code always fail and not covered by
fuzzing
2024-07-12 13:03:46 +02:00
Martijn van Beurden 51e61ae99e Fix mistake in fuzzing seed corpus
The seed corpus had a file that was supposed to cover replaygain
synthesis, but didn't have any replaygain tags. Because of the
fixed format of these tags, they aren't reasonbly reachable by
fuzzing without help
2024-07-12 13:03:46 +02:00
Martijn van Beurden de8bbb0d5b
Update copyright to 2024 (#722) 2024-07-11 15:35:32 +02:00
Martijn van Beurden 15ea6ef822
Fix analyze mode trying to get positions from stdin (#720)
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68539
2024-07-11 07:24:01 +02:00
Martijn van Beurden 9977773a60 Address two Clang warnings 2024-07-10 19:38:09 +02:00
Martijn van Beurden 09d7887b2f Remove unnecessary assert condition
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60777
2024-07-10 19:38:09 +02:00
Martijn van Beurden e14acb96c1
More Pandoc HTML fixes (#717)
- Make html manpages build with old pandoc versions
- Add building of html docs to CMake
2024-07-04 21:45:55 +02:00
Martijn van Beurden b6b5b3259f
Make UTF-8 decoder more restrictive (#712)
Fixes https://github.com/xiph/flac/issues/706
2024-07-03 09:10:30 +02:00
Martijn van Beurden b773157a59 Update 'distcheck' github action to Ubuntu 24.04 2024-06-27 08:33:31 +02:00
Martijn van Beurden 97d8cd19ce Add building of a tarball to github actions 2024-06-27 08:33:31 +02:00
Martijn van Beurden 9b945dcb90 Build HTML docs: manpage readers are very uncommon on Windows 2024-06-27 08:33:31 +02:00
H2Swine 9dd697bb8d
Improve flac executable built-in help text (#708)
Co-authored-by: Martijn van Beurden <mvanb1@gmail.com>
2024-06-26 13:03:00 +02:00
Martijn van Beurden dda3e77ea2
On WIN32, set stdout/stderr to UTF-8 (#714)
When stderr (flac) or stdout (metaflac) is redirected to a file,
output of non-ASCII characters fails. This commit should fix that.

Fixes https://github.com/xiph/flac/issues/713

NOTE: To enable this change, metaflac no longer outputs
application block data as binary directly, because that would
potentially result in incorrect UTF-8 codepoint. Instead, all
bytes that cannot be represented as printable ASCII are
replaced with the Unicode replacement character
2024-06-26 09:42:07 +02:00
Martijn van Beurden 706c061457
Fix https://github.com/m-ab-s/media-autobuild_suite/issues/2718 (#711) 2024-06-19 15:22:26 +02:00
Sam James ef1e185e2c
test: stop using which (#709)
`which` is an external command which isn't required by POSIX.

Debian and other distributions (like Gentoo!) are looking
to drop it from their base set of packages.

Switch to `command -v` which is, however, POSIX. See https://lwn.net/Articles/874049/.
2024-06-19 11:36:29 +02:00
Martijn van Beurden 1c5803950e
Do not warn that multithreading is disabled when setting 1 thread (#710) 2024-06-19 08:42:08 +02:00
Steve Lhomme a0f6661beb
export -lssp for static libraries (#704)
.a files in MinGW don't list the other static libraries they depend on.
We need to provide it through the pkg-config file.
2024-06-13 12:03:30 +02:00
Martijn van Beurden d6204ea911 Enable CMake install of api docs from tarball w/o doxygen 2024-06-07 09:18:06 +02:00
Jevin Sweval d21202e3f2 Fix CMake Doxygen install (match Makefile builds) 2024-06-07 09:18:06 +02:00
Kevin Groeneveld 7acdaabe2b Fix fallback to frame header bps.
Commit d4daa86167 ("Check for bps% 8 != 0 if no streaminfo is present")
breaks fallback to frame header bps as it tests decoder_session->bps at
a point where it is guaranteed to be 0 as this is the else case of the
if(decoder_session->bps) block.

Some corrupted FLAC files that used to play before the above mentioned
commit no longer can be played.

Move decoder_session->bps = bps to before the decoder_session->bps
validation to restore functionality more similar to before.
2024-06-06 14:50:27 +02:00
Martijn van Beurden cfe3afca9b
Further improve calculation of when to use wide residual computation (#702) 2024-05-16 16:00:19 +02:00
Martijn van Beurden 1ab3c8e748
Improve calculation of when to use wide residual computation (#700) 2024-05-15 10:42:58 +02:00
Martijn van Beurden 04532802fd
Escape double dashes, so they don't get converted to em dashes (#698)
Fixes https://github.com/xiph/flac/issues/671
2024-05-02 15:54:54 +02:00
Martijn van Beurden f5012d5e88 Update iconv.m4 2024-05-02 08:30:27 +02:00
Martijn van Beurden d6921ed6cd Fix use of --enable-asm-optimizations
Fixes https://github.com/xiph/flac/issues/686
2024-05-02 08:30:27 +02:00
Martijn van Beurden de80349297
Fix bug in CHECK_ORDER_IS_VALID macro in functions with intrinsics (#696)
This fixes a few things I missed with https://github.com/xiph/flac/pull/694
2024-05-01 17:03:19 +02:00
Martijn van Beurden 653b1187a1
Update GNU Free Documentation License (#697) 2024-05-01 12:11:18 +02:00
Martijn van Beurden 0dd1140a71
Add libtool to MacOS dependencies for github actions (#695) 2024-05-01 08:55:23 +02:00
Martijn van Beurden 61f8513c1f
Fix bug in CHECK_ORDER_IS_VALID macro (#694)
Fixes https://github.com/xiph/flac/issues/635
2024-04-30 15:30:30 +02:00
Steve Lhomme 49ab34dfef [CMake] disable fseeko on 32-bit Android before API 24
It can be linked in the NDK so check_function_exists detects it. But it's only supporting _FILE_OFFSET_BITS=64
since Android API 24 [1].

With NDK 26 it's no longer possible to build assuming the API is always available.

[1] https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
2024-04-22 14:37:41 +02:00
Steve Lhomme 9977bb5b77 include/share/compat.h : use fseek if fseeko is not available 2024-04-22 14:37:41 +02:00
Martijn van Beurden 5f6a352921
Update github action dependencies to latest versions (#682)
As described here:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
2024-03-28 08:04:21 +01:00
Martijn van Beurden 67a65b7ccf
Improve failure handling when multithreading (#681)
In case of encoder failure within a thread, asserts were false
and a locked mutex would be destroyed. This fix leaves in a race
condition: encoder->protected_->state is written without a lock.

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62650
2024-03-27 21:51:07 +01:00
Martijn van Beurden d2b2441056
Different loose mid side algorithm compatible with multithreading (#675) 2024-03-09 21:40:03 +01:00
werner mendizabal 8d4ccdfbb1
Update CMakeLists to allow building with emscripten (#664) 2024-03-08 19:03:11 +01:00
Martijn van Beurden 8a685ee77c Silence fuzzer_seek 2024-03-07 21:02:05 +01:00
Martijn van Beurden 9504c76970 Handle missing decoder in FLAC__stream_encoder_get_verify_decoder_state() 2024-03-07 21:02:05 +01:00
Miroslav Lichvar 377289eea9 Handle missing decoder in FLAC__stream_encoder_get_resolved_state_string()
Fix crash when trying to get the decoder's state string while the decoder
is missing due to a memory allocation error.
2024-03-07 21:02:05 +01:00
Martijn van Beurden 79a164ecdf Augment fuzzing to catch https://github.com/xiph/flac/pull/645 2024-03-07 21:02:05 +01:00