missed cvs add/rm
This commit is contained in:
parent
be8b9b20d7
commit
465bbd0647
16
audio/libsndfile/patches/patch-CMakeLists_txt
Normal file
16
audio/libsndfile/patches/patch-CMakeLists_txt
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.1 2021/01/16 12:54:12 sthen Exp $
|
||||
|
||||
CMake: Fix INSTALL_MANPAGES option.
|
||||
|
||||
Index: CMakeLists.txt
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -74,7 +74,7 @@ if (NOT ENABLE_CPU_CLIP)
|
||||
set (CPU_CLIPS_NEGATIVE FALSE)
|
||||
endif ()
|
||||
cmake_dependent_option (ENABLE_COMPATIBLE_LIBSNDFILE_NAME "Set DLL name to libsndfile-1.dll (canonical name), sndfile.dll otherwise" OFF "WIN32;BUILD_SHARED_LIBS" OFF)
|
||||
-cmake_dependent_option (INSTALL_MANPAGES "Install man pages for programs" ON "BUILD_PROGRAMS AND (UNIX OR MINGW OR CYGWIN)" OFF)
|
||||
+cmake_dependent_option (INSTALL_MANPAGES "Install man pages for programs" ON "BUILD_PROGRAMS" OFF)
|
||||
|
||||
set (HAVE_EXTERNAL_XIPH_LIBS ${ENABLE_EXTERNAL_LIBS})
|
||||
set (HAVE_SQLITE3 ${BUILD_REGTEST})
|
@ -1,16 +0,0 @@
|
||||
$OpenBSD: patch-configure,v 1.3 2018/04/23 08:48:54 jca Exp $
|
||||
|
||||
Some compilers don't have -Wvla
|
||||
|
||||
Index: configure
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -20828,7 +20828,7 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
common_flags="-Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wundef -Wuninitialized -Winit-self"
|
||||
|
||||
# -Winline -Wconversion "
|
||||
- CFLAGS="$CFLAGS $common_flags -Wbad-function-cast -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return -Wvla"
|
||||
+ CFLAGS="$CFLAGS $common_flags -Wbad-function-cast -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return"
|
||||
CXXFLAGS="$CXXFLAGS $common_flags -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo"
|
||||
|
||||
if test "x$enable_gcc_opt" = "xno" ; then
|
17
audio/libsndfile/patches/patch-programs_sndfile-info_c
Normal file
17
audio/libsndfile/patches/patch-programs_sndfile-info_c
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-programs_sndfile-info_c,v 1.1 2021/01/16 12:54:12 sthen Exp $
|
||||
|
||||
Fix stack buffer overflow in instrument_dump. When loop_count more than 16,
|
||||
it has a stack buffer overflow.
|
||||
|
||||
Index: programs/sndfile-info.c
|
||||
--- programs/sndfile-info.c.orig
|
||||
+++ programs/sndfile-info.c
|
||||
@@ -312,7 +312,7 @@ instrument_dump (const char *filename)
|
||||
printf (" Key : %d - %d\n", (int) inst.key_lo, (int) inst.key_hi) ;
|
||||
printf (" Loop points : %d\n", inst.loop_count) ;
|
||||
|
||||
- for (k = 0 ; k < inst.loop_count ; k++)
|
||||
+ for (k = 0 ; k < inst.loop_count && k < ARRAY_LEN (inst.loops) ; k++)
|
||||
printf (" %-2d Mode : %s Start : %6d End : %6d Count : %6d\n", k, str_of_type (inst.loops [k].mode), inst.loops [k].start, inst.loops [k].end, inst.loops [k].count) ;
|
||||
|
||||
putchar ('\n') ;
|
63
audio/libsndfile/patches/patch-src_aiff_c
Normal file
63
audio/libsndfile/patches/patch-src_aiff_c
Normal file
@ -0,0 +1,63 @@
|
||||
$OpenBSD: patch-src_aiff_c,v 1.2 2021/01/16 12:54:12 sthen Exp $
|
||||
|
||||
- Fix aiff_read_header() memory leak.
|
||||
- Fix memory leak in aiff_open.
|
||||
- Fix AIFF parsing bug.
|
||||
- Fix memory leak in aiff_read_basc_chunk.
|
||||
- Fix memory leak in aiff_read_header.
|
||||
|
||||
Index: src/aiff.c
|
||||
--- src/aiff.c.orig
|
||||
+++ src/aiff.c
|
||||
@@ -243,6 +243,8 @@ aiff_open (SF_PRIVATE *psf)
|
||||
if ((psf->container_data = calloc (1, sizeof (AIFF_PRIVATE))) == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
|
||||
+ psf->container_close = aiff_close ;
|
||||
+
|
||||
if (psf->file.mode == SFM_READ || (psf->file.mode == SFM_RDWR && psf->filelength > 0))
|
||||
{ if ((error = aiff_read_header (psf, &comm_fmt)))
|
||||
return error ;
|
||||
@@ -283,7 +285,6 @@ aiff_open (SF_PRIVATE *psf)
|
||||
psf->set_chunk = aiff_set_chunk ;
|
||||
} ;
|
||||
|
||||
- psf->container_close = aiff_close ;
|
||||
psf->command = aiff_command ;
|
||||
|
||||
switch (SF_CODEC (psf->sf.format))
|
||||
@@ -498,6 +499,11 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fm
|
||||
return SFE_WAV_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 ;
|
||||
|
||||
@@ -800,6 +806,10 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fm
|
||||
break ;
|
||||
} ;
|
||||
|
||||
+ if (psf->cues)
|
||||
+ { free (psf->cues) ;
|
||||
+ psf->cues = NULL ;
|
||||
+ } ;
|
||||
if ((psf->cues = psf_cues_alloc (mark_count)) == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
|
||||
@@ -1719,6 +1729,11 @@ aiff_read_basc_chunk (SF_PRIVATE * psf, int datasize)
|
||||
|
||||
psf_log_printf (psf, " Loop Type : 0x%x (%s)\n", bc.loopType, type_str) ;
|
||||
|
||||
+ if (psf->loop_info)
|
||||
+ { psf_log_printf (psf, " Found existing loop info, using last one.\n") ;
|
||||
+ free (psf->loop_info) ;
|
||||
+ psf->loop_info = NULL ;
|
||||
+ } ;
|
||||
if ((psf->loop_info = calloc (1, sizeof (SF_LOOP_INFO))) == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
|
45
audio/libsndfile/patches/patch-src_wav_c
Normal file
45
audio/libsndfile/patches/patch-src_wav_c
Normal file
@ -0,0 +1,45 @@
|
||||
$OpenBSD: patch-src_wav_c,v 1.1 2021/01/16 12:54:12 sthen Exp $
|
||||
|
||||
- Fix memory leak in wav_read_smpl_chunk().
|
||||
- Fix leak in wav_read_header.
|
||||
- Fix memory leak in wav_read_acid_chunk.
|
||||
|
||||
Index: src/wav.c
|
||||
--- src/wav.c.orig
|
||||
+++ src/wav.c
|
||||
@@ -481,6 +481,11 @@ wav_read_header (SF_PRIVATE *psf, int *blockalign, int
|
||||
|
||||
psf_log_printf (psf, " Count : %d\n", cue_count) ;
|
||||
|
||||
+ if (psf->cues)
|
||||
+ { free (psf->cues) ;
|
||||
+ psf->cues = NULL ;
|
||||
+ } ;
|
||||
+
|
||||
if ((psf->cues = psf_cues_alloc (cue_count)) == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
|
||||
@@ -1335,6 +1340,11 @@ wav_read_smpl_chunk (SF_PRIVATE *psf, uint32_t chunkle
|
||||
*/
|
||||
bytesread += psf_binheader_readf (psf, "4", &sampler_data) ;
|
||||
|
||||
+ if (psf->instrument)
|
||||
+ { psf_log_printf (psf, " Found more than one SMPL chunk, using last one.\n") ;
|
||||
+ free (psf->instrument) ;
|
||||
+ psf->instrument = NULL ;
|
||||
+ } ;
|
||||
if ((psf->instrument = psf_instrument_alloc ()) == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
|
||||
@@ -1486,6 +1496,11 @@ wav_read_acid_chunk (SF_PRIVATE *psf, uint32_t chunkle
|
||||
|
||||
psf_binheader_readf (psf, "j", chunklen - bytesread) ;
|
||||
|
||||
+ if (psf->loop_info)
|
||||
+ { psf_log_printf (psf, " Found existing loop info, using last one.\n") ;
|
||||
+ free (psf->loop_info) ;
|
||||
+ psf->loop_info = NULL ;
|
||||
+ } ;
|
||||
if ((psf->loop_info = calloc (1, sizeof (SF_LOOP_INFO))) == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
|
43
audio/libsndfile/patches/patch-src_wavlike_c
Normal file
43
audio/libsndfile/patches/patch-src_wavlike_c
Normal file
@ -0,0 +1,43 @@
|
||||
$OpenBSD: patch-src_wavlike_c,v 1.1 2021/01/16 12:54:12 sthen Exp $
|
||||
|
||||
- Fix leak in wavlike_read_cart_chunk.
|
||||
- Fix memory leak in wavlike_read_peak_chunk.
|
||||
- Fix use of uninitialized value in exif_subchunk_parse.
|
||||
|
||||
Index: src/wavlike.c
|
||||
--- src/wavlike.c.orig
|
||||
+++ src/wavlike.c
|
||||
@@ -838,6 +838,12 @@ wavlike_read_cart_chunk (SF_PRIVATE *psf, uint32_t chu
|
||||
|
||||
psf_log_printf (psf, "cart : %u\n", chunksize) ;
|
||||
|
||||
+ if (psf->cart_16k)
|
||||
+ { psf_log_printf (psf, " Found more than one cart chunk, using last one.\n") ;
|
||||
+ free (psf->cart_16k) ;
|
||||
+ psf->cart_16k = NULL ;
|
||||
+ } ;
|
||||
+
|
||||
if ((psf->cart_16k = cart_var_alloc ()) == NULL)
|
||||
{ psf->error = SFE_MALLOC_FAILED ;
|
||||
return psf->error ;
|
||||
@@ -1187,6 +1193,11 @@ wavlike_read_peak_chunk (SF_PRIVATE * psf, size_t chun
|
||||
return SFE_WAV_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 ;
|
||||
|
||||
@@ -1258,7 +1269,7 @@ exif_fill_and_sink (SF_PRIVATE *psf, char* buf, size_t
|
||||
*/
|
||||
static int
|
||||
exif_subchunk_parse (SF_PRIVATE *psf, uint32_t length)
|
||||
-{ uint32_t marker, dword, vmajor = -1, vminor = -1, bytesread = 0 ;
|
||||
+{ uint32_t marker, dword = 0, vmajor = -1, vminor = -1, bytesread = 0 ;
|
||||
char buf [4096] ;
|
||||
int thisread ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user