summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libFLAC/bitwrite.c: Add sanity check to prevent DOS attacktopic/oss-fuzzErik de Castro Lopo2019-10-101-0/+4
| | | | | | | | | | | | When fuzzing the encoder it is possible to cause the encoder to to take 10s of seconds or more encoding relatively short chunks of audio. Adding a sanity check for the number of bits and returning false (indicating memory allocation failed) prevents this and seems to have no effect in the encoding of non-fuzzing inputs. Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17319 Testcase: fuzzer_encoder-5639344026550272
* libFLAC/bitwriter.c: Add sanity check to prevent excessive allocationErik de Castro Lopo2019-10-101-0/+4
| | | | | | | | | | | | When fuzzing the encoder it is possible to cause the encoder to allocate huge amounts of memory. Sanity check for the number of bits to grow the bitwrite capacity and returning false (indicating memory allocation failed) prevents this and seems to have no effect in the encoding of non-fuzzing inputs. Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17273 Testcase: fuzzer_encoder-5640245298593792
* cmake: fix nasm sources build when building in a separate directorysezero2019-10-101-2/+3
| | | | | | | | | | When building in the same directory as the source, it works, but not in a separate directory. The trailing slash is important with nasm. Note that include_directories("${CMAKE_CURRENT_SOURCE_DIR}/") does not work because cmake seems to strip the trailing slash. Also relax the cmake version requirement from 3.12 to 3.9 as everywhere else in the tree: it works just fine.
* configure.ac: allow several compiler flags for clangsezero2019-10-102-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | The flac configury marked clang as 'not being gcc' and excluded a lot of compiler switches, most importantly the visibility flags, from being used with it. This was done possibly after a problem reported at: https://github.com/erikd/libsndfile/issues/49 . This patch does the following: - m4/gcc_version.m4 (XIPH_GCC_VERSION): set GCC_MAJOR_VERSION and GCC_MINOR_VERSION to 0 for non-gcc. Previously, they were left unset. - configure: the gcc version checks are, naturally, against non- zero values, so, allow many compiler switches to be used with clang without affecting real-gcc cases. - configure: When setting CFLAGS="-O3 -funroll-loops", also set CXXFLAGS="-O3". Prevents g++ warnings with _FORTIFY_SOURCE, i.e.: '_FORTIFY_SOURCE requires compiling with optimization (-O)' Tested compilation using gcc-7.3.1 and clang-5.0.2 on x86_64-linux, and gcc-4.4.7 and clang-3.4.2 on an i686-linux. Also tested cross- compiling for Mac OS X using clang-5.0.2.
* cmake: do not add visibility attributes to shared lib builds for win32.sezero2019-10-102-4/+21
|
* make dllexport work with compilers other than MSVCsezero2019-10-104-10/+29
| | | | | | | | the issue is, flac and metaflac exes rely on flac_internal_???_utf8() procedures from windows_unicode_filenames.c and there is no easy way to exclude them from exports without breaking things. So export them explicitly (they are exported anyway w/o this patch), but add a FIXME note about the kludge in windows_unicode_filenames.c.
* move the new public get_decoder_client_data function to public header.sezero2019-10-102-5/+10
|
* libFLAC/bitreader.c: Fix out-of-bounds readErik de Castro Lopo2019-10-081-1/+1
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069 Testcase: fuzzer_decoder-5670265022840832
* Make sure CMake build files end up in release tarballErik de Castro Lopo2019-10-0133-3/+48
|
* Remove un-needed Makefile.amErik de Castro Lopo2019-10-019-132/+1
|
* configure.ac: check for sys/auxv.h before defining FLAC__CPU_PPCPeter Seiderer2019-09-301-2/+2
| | | | | | | | | | Signed-off-by: Peter Seiderer <ps.report@gmx.net> --- Note: One of the buildroot autobuilder provided powerpc toolchains seem to not provide the sys/auxv.h header file, resulting in a compile failure (see [1] for details). [1] http://lists.busybox.net/pipermail/buildroot/2019-September/259732.html
* libFLAC/lpc.c: Fix signed integer overflowErik de Castro Lopo2019-09-161-12/+12
| | | | | | | | Do the addition as 64 bits before truncating to 32 bits. Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16459 Testcase: fuzzer_decoder-5728784602365952
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-09-161-2/+4
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16464 Testcase: fuzzer_decoder-5663276452544512
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-09-161-1/+1
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16458 Testcase: fuzzer_decoder-5649174900506624
* libFLAC/bitreader.c: Fix OOB readErik de Castro Lopo2019-09-161-5/+8
| | | | | | Credit: OSS-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16457 Testcase: fuzzer_decoder-5076189185572864
* Fix a number of gcc 9.2 compiler warningsErik de Castro Lopo2019-09-157-20/+24
|
* Run libFLAC++ through clang-tidy.Rosen Penev2019-09-153-165/+164
| | | | | | | | | Applied the following suggestions: modernize-deprecated-headers google-readability-casting google-readability-namespace-comments readability-else-after-return
* Fix function redefinition on arm-none-eabi compilersoreo6392019-09-154-9/+9
|
* window: fabs > fabsf and cos > cosf where it makes senseRosen Penev2019-09-151-16/+16
| | | | The f functions are faster. It seems the arguments are all floats.
* flac/utils: Add missing defineRosen Penev2019-09-151-0/+3
| | | | wcswidth needs _XOPEN_SOURCE defined. Otherwise, no declaration.
* Switch to utimensat for newer POSIX versionsRosen Penev2019-08-205-12/+37
| | | | | | | | Some libcs like uClibc-ng can optionally disable deprecated functions. utime is one of them. When done so, both the header and the function go missing. This fixes flac_utime to work in such a situation.
* Fix build on FreeBSD PowerPCpkubaj2019-08-181-0/+13
| | | | | Used the elf_aux_info function on FreeBSD and clarify that users of other systems need to implement reading from AT_HWCAP2.
* Fix metaflac under ctest.Ralph Giles2019-08-161-1/+1
| | | | | | | | The 1.3.3 release didn't update the version number in the cmake build. It's too late to fix the release, but bringing the version number into sync allows the metaflac test which verifies the encoder's embedded version number to pass, giving us proper test feedback on other changes to the development tree.
* libFLAC: Rename get_client_data_from_decoder functionErik de Castro Lopo2019-08-092-4/+4
| | | | | This function was added after the 1.3.2 release, but the name was bad (missing "FLAC__" at the start) and the pointer returned should be 'const'.
* increase required minimum cmake version to 3.9.sezero2019-08-061-1/+1
|
* Do not assume that sys/param.h defines MIN and MAXsezero2019-08-051-0/+2
| | | | One such example is sys/param.h from MinGW.
* doc: Add xmlns attributes.Ralph Giles2019-08-0516-16/+16
| | | | validator.w3.org wants a namespace declaration for xhtml.
* Version 1.3.31.3.3Erik de Castro Lopo2019-08-0412-19/+109
|
* doc: Remove xhtml validator links.Fabian Greffrath2019-08-0416-48/+0
| | | | | | | | | | | | | | Fix "privacy-breach-w3c-valid-html" lintian error. Don't ping an external site when loading documentation pages since this can be used to track user activity. These links are also broken, since they depend on the referer header, which browsers no longer send to insecure pages for similar privacy reasons. That aspect could be addressed by using https urls for the validator site. Signed-off-by: Ralph Giles <giles@thaumas.net>
* doc: Use empty-element <hr/> tag.Ralph Giles2019-08-041-1/+1
| | | | | | | | | Improve the conformance of the xhtml generated by doxygen by using the self-closing <hr/> tag in the custom footer. Without this, xmllint complains about </body> and </html> end tags inside the still-only <hr>. That syntax is allowed in html but not xml.
* .travis.yml: Generate and validate html documentation.Ralph Giles2019-08-041-1/+5
| | | | | | | | | | | | | | | | | | Install Doxygen when running on the linux environment to test generation of the API documentation. Run the included static html documentation as well as the generated API documentation through xmllint to verify it conforms to the declared DTD. Since this this will be very slow or fail relying on network resources, also install the w3c-sgml library so the xhtml1 DTDs are available locally. We're checking the source files, not build results in the particular environment, so it's fine to run this check on only a subset of builds. Don't validate on CMake builds since they're not currently generating API documentation even when Doxygen is available.
* Add -lrt for all operating systems for clock_gettimeDagobert Michelsen2019-07-171-9/+4
|
* Update Visual Studio 2005 filesErik de Castro Lopo2019-07-162-0/+16
| | | | Patch-from: Janne Hyvärinen
* Fix CppCheck warningsErik de Castro Lopo2019-07-153-9/+14
|
* test: Ignore varying length in metadataErik de Castro Lopo2019-07-1580-540/+547
| | | | | The metadata test checked for specific lengths which change from 5 bytes for something like "1.3.2" to 9 bytes for something like "1.3.3pre1".
* Fix CMake configure warningevpobr2019-06-011-1/+1
| | | | | Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted.
* Fixed #107: CMake error without enabling BUILD_CXXLIBSVitaliy Kirsanov2019-05-311-3/+4
|
* CMake: fixed windows_unicode_filenames linking errorsВиталий Кирсанов2019-05-281-2/+4
|
* Fix Visual Studio solution generation with CMakeevpobr2019-05-121-4/+5
| | | | | | Rename flac application target to flacapp to avoid name collision with FLAC library target. Closes #101.
* Added README description for CMakeVitaliy Kirsanov2019-05-041-0/+82
|
* CMAKE_BUILD_TYPE set to Release by default: improvedVitaliy Kirsanov2019-05-041-2/+2
|
* Enable components search in package config modeevpobr2019-05-041-0/+9
|
* CMAKE_BUILD_TYPE set to Release by defaultVitaliy Kirsanov2019-05-041-0/+4
|
* Added ECHO_C to CMake testsVitaliy Kirsanov2019-05-041-1/+4
|
* Ogg::Ogg renamed to Ogg::oggVitaliy Kirsanov2019-05-042-5/+5
|
* Use of BUILD_SHARED_LIBS addedVitaliy Kirsanov2019-05-0423-97/+68
|
* Fixed dependencies on win_utf8_ioВиталий Кирсанов2019-05-049-20/+30
|
* Fixed dependency between grabbag and utf8Vitaliy Kirsanov2019-05-043-3/+2
|
* CMake minimum required lowered to 3.1Vitaly Kirsanov2019-05-0410-88/+296
|
* Add missing fseeko checkevpobr2019-05-041-0/+3
|