diff --git a/0001-CVE-2021-3246.patch b/0001-CVE-2021-3246.patch deleted file mode 100644 index 1fa7a6b..0000000 --- a/0001-CVE-2021-3246.patch +++ /dev/null @@ -1,38 +0,0 @@ -From deb669ee8be55a94565f6f8a6b60890c2e7c6f32 Mon Sep 17 00:00:00 2001 -From: bobsayshilol -Date: Thu, 18 Feb 2021 21:52:09 +0000 -Subject: [PATCH] ms_adpcm: Fix and extend size checks - -'blockalign' is the size of a block, and each block contains 7 samples -per channel as part of the preamble, so check against 'samplesperblock' -rather than 'blockalign'. Also add an additional check that the block -is big enough to hold the samples it claims to hold. - -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26803 ---- - src/ms_adpcm.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - - -diff --git a/src/ms_adpcm.c b/src/ms_adpcm.c -index 5e8f1a316..a21cb9941 100644 ---- a/src/ms_adpcm.c -+++ b/src/ms_adpcm.c -@@ -128,8 +128,14 @@ wavlike_msadpcm_init (SF_PRIVATE *psf, int blockalign, int samplesperblock) - if (psf->file.mode == SFM_WRITE) - samplesperblock = 2 + 2 * (blockalign - 7 * psf->sf.channels) / psf->sf.channels ; - -- if (blockalign < 7 * psf->sf.channels) -- { psf_log_printf (psf, "*** Error blockalign (%d) should be > %d.\n", blockalign, 7 * psf->sf.channels) ; -+ /* There's 7 samples per channel in the preamble of each block */ -+ if (samplesperblock < 7 * psf->sf.channels) -+ { psf_log_printf (psf, "*** Error samplesperblock (%d) should be >= %d.\n", samplesperblock, 7 * psf->sf.channels) ; -+ return SFE_INTERNAL ; -+ } ; -+ -+ if (2 * blockalign < samplesperblock * psf->sf.channels) -+ { psf_log_printf (psf, "*** Error blockalign (%d) should be >= %d.\n", blockalign, samplesperblock * psf->sf.channels / 2) ; - return SFE_INTERNAL ; - } ; - - diff --git a/0002-CVE-2021-4156.patch b/0002-CVE-2021-4156.patch deleted file mode 100644 index c39c029..0000000 --- a/0002-CVE-2021-4156.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ced91d7b971be6173b604154c39279ce90ad87cc Mon Sep 17 00:00:00 2001 -From: yuan -Date: Tue, 20 Apr 2021 16:16:32 +0800 -Subject: [PATCH] flac: Fix improper buffer reusing (#732) - ---- - src/flac.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/flac.c b/src/flac.c -index 64d0172e6..e33204505 100644 ---- a/src/flac.c -+++ b/src/flac.c -@@ -948,7 +948,11 @@ flac_read_loop (SF_PRIVATE *psf, unsigned len) - /* Decode some more. */ - while (pflac->pos < pflac->len) - { if (FLAC__stream_decoder_process_single (pflac->fsd) == 0) -+ { psf_log_printf (psf, "FLAC__stream_decoder_process_single returned false\n") ; -+ /* Current frame is busted, so NULL the pointer. */ -+ pflac->frame = NULL ; - break ; -+ } ; - state = FLAC__stream_decoder_get_state (pflac->fsd) ; - if (state >= FLAC__STREAM_DECODER_END_OF_STREAM) - { psf_log_printf (psf, "FLAC__stream_decoder_get_state returned %s\n", FLAC__StreamDecoderStateString [state]) ; diff --git a/0003-Fix-memory-leak-in-caf_read_header.patch b/0003-Fix-memory-leak-in-caf_read_header.patch deleted file mode 100644 index 01b966e..0000000 --- a/0003-Fix-memory-leak-in-caf_read_header.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 65cf4511928ff0a4b387a15e10ae9f2431596cf7 Mon Sep 17 00:00:00 2001 -From: ctl-ly -Date: Thu, 29 Dec 2022 10:53:55 +0800 -Subject: [PATCH] fix1 - ---- - docs/index.md | 2 +- - include/sndfile.h.in | 4 ++-- - src/caf.c | 5 +++++ - 3 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/docs/index.md b/docs/index.md -index 3779fdf..ee6bd07 100644 ---- a/docs/index.md -+++ b/docs/index.md -@@ -194,7 +194,7 @@ long as you abide by [the license](http://www.gnu.org/copyleft/lesser.html). - Check latest version on - [GitHub Releases page](https://github.com/libsndfile/libsndfile/releases/). - --Binatries and source packages are signed by current releaser David Seifert aka -+Binaries and source packages are signed by current releaser David Seifert aka - @SoapGentoo. You can verify signatures with his public GPG key: - - ``` -diff --git a/include/sndfile.h.in b/include/sndfile.h.in -index 917ff4b..970fb26 100644 ---- a/include/sndfile.h.in -+++ b/include/sndfile.h.in -@@ -173,6 +173,7 @@ enum - - SFC_SET_RAW_START_OFFSET = 0x1090, - -+ /* Commands reserved for dithering, which is not implemented. */ - SFC_SET_DITHER_ON_WRITE = 0x10A0, - SFC_SET_DITHER_ON_READ = 0x10A1, - -@@ -386,8 +387,7 @@ typedef struct - - /* - ** Enums and typedefs for adding dither on read and write. --** See the html documentation for sf_command(), SFC_SET_DITHER_ON_WRITE --** and SFC_SET_DITHER_ON_READ. -+** Reserved for future implementation. - */ - - enum -diff --git a/src/caf.c b/src/caf.c -index 45b1dba..6b2e579 100644 ---- a/src/caf.c -+++ b/src/caf.c -@@ -416,6 +416,11 @@ caf_read_header (SF_PRIVATE *psf) - return SFE_CAF_BAD_PEAK ; - } ; - -+ if (psf->peak_info) -+ { psf_log_printf (psf, "*** Found existing peak info, using last one.\n") ; -+ free (psf->peak_info) ; -+ psf->peak_info = NULL ; -+ }; - if ((psf->peak_info = peak_info_calloc (psf->sf.channels)) == NULL) - return SFE_MALLOC_FAILED ; - --- -2.27.0 - diff --git a/libsndfile-1.0.31.tar.bz2 b/libsndfile-1.0.31.tar.bz2 deleted file mode 100644 index 683f561..0000000 Binary files a/libsndfile-1.0.31.tar.bz2 and /dev/null differ diff --git a/libsndfile-1.2.0.tar.xz b/libsndfile-1.2.0.tar.xz new file mode 100644 index 0000000..e054a16 Binary files /dev/null and b/libsndfile-1.2.0.tar.xz differ diff --git a/libsndfile.spec b/libsndfile.spec index fb29a5d..ca326a1 100644 --- a/libsndfile.spec +++ b/libsndfile.spec @@ -1,19 +1,15 @@ Name: libsndfile -Version: 1.0.31 -Release: 3 +Version: 1.2.0 +Release: 1 Summary: Library for reading and writing sound files License: LGPLv2+ and GPLv2+ and BSD URL: http://libsndfile.github.io/libsndfile -Source0: https://github.com/libsndfile/libsndfile/releases/download/%{version}/%{name}-%{version}.tar.bz2 +Source0: https://github.com/libsndfile/libsndfile/releases/download/%{version}/%{name}-%{version}.tar.xz BuildRequires: alsa-lib-devel gcc gcc-c++ flac-devel BuildRequires: libogg-devel libtool libvorbis-devel pkgconfig BuildRequires: sqlite-devel -Patch1: 0001-CVE-2021-3246.patch -Patch2: 0002-CVE-2021-4156.patch -Patch3: 0003-Fix-memory-leak-in-caf_read_header.patch - %description Libsndfile is a C library for reading and writing files containing sampled sound such as MS Windows WAV and the Apple/SGI AIFF format @@ -80,7 +76,7 @@ LD_LIBRARY_PATH=$PWD/src/.libs make check %files %{_libdir}/%{name}.so.* -%doc AUTHORS README NEWS +%doc AUTHORS README NEWS.OLD %license COPYING %files utils @@ -117,6 +113,9 @@ LD_LIBRARY_PATH=$PWD/src/.libs make check %{_mandir}/man1/sndfile-salvage.1* %changelog +* Fri Feb 10 2023 Liu Yuntao - 1.2.0-1 +- update to 1.2.0, and update upstream URL + * Thu Dec 29 2022 liying - 1.0.31-3 - Marked unimplemented dither enums in the header file as such. - Fix typo