diff --git a/deps/flac/include/FLAC/all.h b/deps/flac/include/FLAC/all.h index a6a012fc..277dcbc5 100644 --- a/deps/flac/include/FLAC/all.h +++ b/deps/flac/include/FLAC/all.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/deps/flac/include/FLAC/assert.h b/deps/flac/include/FLAC/assert.h index aee23c8c..ee3ee080 100644 --- a/deps/flac/include/FLAC/assert.h +++ b/deps/flac/include/FLAC/assert.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2001-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,6 +34,10 @@ #define FLAC__ASSERT_H /* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */ +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION +#define FLAC__ASSERT(x) if(!(x)) __builtin_abort(); +#define FLAC__ASSERT_DECLARATION(x) x +#else #ifndef NDEBUG #include #define FLAC__ASSERT(x) assert(x) @@ -42,5 +46,6 @@ #define FLAC__ASSERT(x) #define FLAC__ASSERT_DECLARATION(x) #endif +#endif #endif diff --git a/deps/flac/include/FLAC/callback.h b/deps/flac/include/FLAC/callback.h index d00878b6..4babcd32 100644 --- a/deps/flac/include/FLAC/callback.h +++ b/deps/flac/include/FLAC/callback.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2004-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -90,7 +90,9 @@ typedef void* FLAC__IOHandle; /** Signature for the read callback. * The signature and semantics match POSIX fread() implementations - * and can generally be used interchangeably. + * and can generally be used interchangeably. Note that the global + * variable errno from errno.h is read by some libFLAC functions to + * detect read errors. * * \param ptr The address of the read buffer. * \param size The size of the records to be read. @@ -166,6 +168,9 @@ typedef int (*FLAC__IOCallback_Close) (FLAC__IOHandle handle); * * If the seek requirement for an interface is optional, you can signify that * a data source is not seekable by setting the \a seek field to \c NULL. + * + * See the detailed documentation for callbacks in the + * \link flac_callbacks callbacks \endlink module. */ typedef struct { FLAC__IOCallback_Read read; /**< See FLAC__IOCallbacks */ diff --git a/deps/flac/include/FLAC/export.h b/deps/flac/include/FLAC/export.h index 983f13b1..d14728a5 100644 --- a/deps/flac/include/FLAC/export.h +++ b/deps/flac/include/FLAC/export.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -95,9 +95,9 @@ /** These \#defines will mirror the libtool-based library version number, see * http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning */ -#define FLAC_API_VERSION_CURRENT 12 +#define FLAC_API_VERSION_CURRENT 13 #define FLAC_API_VERSION_REVISION 0 /**< see above */ -#define FLAC_API_VERSION_AGE 0 /**< see above */ +#define FLAC_API_VERSION_AGE 1 /**< see above */ #ifdef __cplusplus extern "C" { diff --git a/deps/flac/include/FLAC/format.h b/deps/flac/include/FLAC/format.h index 2d548437..ef7c8b21 100644 --- a/deps/flac/include/FLAC/format.h +++ b/deps/flac/include/FLAC/format.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/deps/flac/include/FLAC/metadata.h b/deps/flac/include/FLAC/metadata.h index 651b7405..4747a5f3 100644 --- a/deps/flac/include/FLAC/metadata.h +++ b/deps/flac/include/FLAC/metadata.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2001-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2197,6 +2197,34 @@ FLAC_API FLAC__bool FLAC__metadata_object_picture_set_data(FLAC__StreamMetadata */ FLAC_API FLAC__bool FLAC__metadata_object_picture_is_legal(const FLAC__StreamMetadata *object, const char **violation); + +/** Get the raw (binary) representation of a FLAC__StreamMetadata objeect. + * After use, free() the returned buffer. The length of the buffer is + * the length of the input metadata object plus 4 bytes for the header. + * + * \param object A pointer to metadata block to be converted. + * \assert + * \code object != NULL \endcode + * \retval FLAC__byte* + * \c NULL if there was an error, else a pointer to a buffer holding + * the requested data. + */ +FLAC_API FLAC__byte * FLAC__metadata_object_get_raw(const FLAC__StreamMetadata *object); + + +/** Turn a raw (binary) representation into a FLAC__StreamMetadata objeect. + * The returned object must be deleted with FLAC__metadata_object_delete() + * after use. + * + * \param buffer A pointer to a buffer containing a binary representation + * to be converted to a FLAC__StreamMetadata object + * \param length The length of the supplied buffer + * \retval FLAC__StreamMetadata* + * \c NULL if there was an error, else a pointer to a FLAC__StreamMetadata + * holding the requested data. + */ + +FLAC_API FLAC__StreamMetadata * FLAC__metadata_object_set_raw(FLAC__byte *buffer, FLAC__uint32 length); /* \} */ #ifdef __cplusplus diff --git a/deps/flac/include/FLAC/ordinals.h b/deps/flac/include/FLAC/ordinals.h index 77757d66..d61aac57 100644 --- a/deps/flac/include/FLAC/ordinals.h +++ b/deps/flac/include/FLAC/ordinals.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,26 +33,10 @@ #ifndef FLAC__ORDINALS_H #define FLAC__ORDINALS_H -#if defined(_MSC_VER) && _MSC_VER < 1600 - -/* Microsoft Visual Studio earlier than the 2010 version did not provide - * the 1999 ISO C Standard header file . - */ - -typedef signed __int8 FLAC__int8; -typedef signed __int16 FLAC__int16; -typedef signed __int32 FLAC__int32; -typedef signed __int64 FLAC__int64; -typedef unsigned __int8 FLAC__uint8; -typedef unsigned __int16 FLAC__uint16; -typedef unsigned __int32 FLAC__uint32; -typedef unsigned __int64 FLAC__uint64; - -#else - -/* For MSVC 2010 and everything else which provides . */ +/* This of course assumes C99 headers */ #include +#include typedef int8_t FLAC__int8; typedef uint8_t FLAC__uint8; @@ -64,22 +48,8 @@ typedef uint16_t FLAC__uint16; typedef uint32_t FLAC__uint32; typedef uint64_t FLAC__uint64; -#endif - typedef int FLAC__bool; typedef FLAC__uint8 FLAC__byte; - -#ifdef true -#undef true -#endif -#ifdef false -#undef false -#endif -#ifndef __cplusplus -#define true 1 -#define false 0 -#endif - #endif diff --git a/deps/flac/include/FLAC/stream_decoder.h b/deps/flac/include/FLAC/stream_decoder.h index f4e16488..2272bcac 100644 --- a/deps/flac/include/FLAC/stream_decoder.h +++ b/deps/flac/include/FLAC/stream_decoder.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/deps/flac/include/FLAC/stream_encoder.h b/deps/flac/include/FLAC/stream_encoder.h index 4ab4dce4..a0d02639 100644 --- a/deps/flac/include/FLAC/stream_encoder.h +++ b/deps/flac/include/FLAC/stream_encoder.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -850,7 +850,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *en * 5 true false tukey(0.5) 8 0 false false false 0 5 0 * 6 true false subdivide_tukey(2) 8 0 false false false 0 6 0 * 7 true false subdivide_tukey(2) 12 0 false false false 0 6 0 - * 8 true false subdivide_tukey(2) 12 0 false false false 0 6 0 + * 8 true false subdivide_tukey(3) 12 0 false false false 0 6 0 * * * \default \c 5 diff --git a/deps/flac/lib/cmake/FLAC/flac-config-version.cmake b/deps/flac/lib/cmake/FLAC/flac-config-version.cmake index 0743ca75..c5c24bd2 100644 --- a/deps/flac/lib/cmake/FLAC/flac-config-version.cmake +++ b/deps/flac/lib/cmake/FLAC/flac-config-version.cmake @@ -7,7 +7,7 @@ # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. # The variable CVF_VERSION must be set before calling configure_file(). -set(PACKAGE_VERSION "1.4.2") +set(PACKAGE_VERSION "1.4.3") if (PACKAGE_FIND_VERSION_RANGE) # Package version must be in the requested version range diff --git a/deps/flac/lib/cmake/FLAC/targets-release.cmake b/deps/flac/lib/cmake/FLAC/targets-release.cmake index bc2cb592..c6a9cf75 100644 --- a/deps/flac/lib/cmake/FLAC/targets-release.cmake +++ b/deps/flac/lib/cmake/FLAC/targets-release.cmake @@ -12,8 +12,8 @@ set_target_properties(FLAC::FLAC PROPERTIES IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libFLAC.a" ) -list(APPEND _IMPORT_CHECK_TARGETS FLAC::FLAC ) -list(APPEND _IMPORT_CHECK_FILES_FOR_FLAC::FLAC "${_IMPORT_PREFIX}/lib/libFLAC.a" ) +list(APPEND _cmake_import_check_targets FLAC::FLAC ) +list(APPEND _cmake_import_check_files_for_FLAC::FLAC "${_IMPORT_PREFIX}/lib/libFLAC.a" ) # Commands beyond this point should not need to know the version. set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deps/flac/lib/cmake/FLAC/targets.cmake b/deps/flac/lib/cmake/FLAC/targets.cmake index 09d7b181..f4b4250e 100644 --- a/deps/flac/lib/cmake/FLAC/targets.cmake +++ b/deps/flac/lib/cmake/FLAC/targets.cmake @@ -1,10 +1,13 @@ # Generated by CMake -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) - message(FATAL_ERROR "CMake >= 2.6.0 required") +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") endif() cmake_policy(PUSH) -cmake_policy(VERSION 2.6...3.19) +cmake_policy(VERSION 2.8.3...3.23) #---------------------------------------------------------------- # Generated CMake target import file. #---------------------------------------------------------------- @@ -13,32 +16,34 @@ cmake_policy(VERSION 2.6...3.19) set(CMAKE_IMPORT_FILE_VERSION 1) # Protect against multiple inclusion, which would fail when already imported targets are added once more. -set(_targetsDefined) -set(_targetsNotDefined) -set(_expectedTargets) -foreach(_expectedTarget FLAC::FLAC) - list(APPEND _expectedTargets ${_expectedTarget}) - if(NOT TARGET ${_expectedTarget}) - list(APPEND _targetsNotDefined ${_expectedTarget}) - endif() - if(TARGET ${_expectedTarget}) - list(APPEND _targetsDefined ${_expectedTarget}) +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS FLAC::FLAC) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") endif() endforeach() -if("${_targetsDefined}" STREQUAL "${_expectedTargets}") - unset(_targetsDefined) - unset(_targetsNotDefined) - unset(_expectedTargets) - set(CMAKE_IMPORT_FILE_VERSION) +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) cmake_policy(POP) return() endif() -if(NOT "${_targetsDefined}" STREQUAL "") - message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") endif() -unset(_targetsDefined) -unset(_targetsNotDefined) -unset(_expectedTargets) +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) # Compute the installation prefix relative to this file. @@ -64,21 +69,22 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12) endif() # Load information for each installed configuration. -get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -file(GLOB CONFIG_FILES "${_DIR}/targets-*.cmake") -foreach(f ${CONFIG_FILES}) - include(${f}) +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/targets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) # Cleanup temporary variables. set(_IMPORT_PREFIX) # Loop over all imported files and verify that they actually exist -foreach(target ${_IMPORT_CHECK_TARGETS} ) - foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) - if(NOT EXISTS "${file}" ) - message(FATAL_ERROR "The imported target \"${target}\" references the file - \"${file}\" +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. @@ -88,9 +94,11 @@ but not all the files it references. ") endif() endforeach() - unset(_IMPORT_CHECK_FILES_FOR_${target}) + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") endforeach() -unset(_IMPORT_CHECK_TARGETS) +unset(_cmake_target) +unset(_cmake_import_check_targets) # This file does not depend on other imported targets which have # been exported from the same project but in a separate export set. diff --git a/deps/flac/lib/libFLAC.a b/deps/flac/lib/libFLAC.a index c603cc6c..683b7735 100644 Binary files a/deps/flac/lib/libFLAC.a and b/deps/flac/lib/libFLAC.a differ diff --git a/deps/flac/lib/pkgconfig/flac.pc b/deps/flac/lib/pkgconfig/flac.pc index aff15921..e9603022 100644 --- a/deps/flac/lib/pkgconfig/flac.pc +++ b/deps/flac/lib/pkgconfig/flac.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include Name: FLAC Description: Free Lossless Audio Codec Library -Version: 1.4.2 +Version: 1.4.3 Requires.private: ogg Libs: -L${libdir} -lFLAC Libs.private: -lm