aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2020-08-23 01:32:24 +0300
committerLeo <thinkabit.ukim@gmail.com>2020-08-24 18:59:18 +0000
commit0eeb26ab8378dd83978bffabf8527e4c7fbda95e (patch)
treec0dca25e0b23e17deb13294cd5ab5974b06c1adb
parentf162bcefc559f6ce85ae3723feba8b3c356ec710 (diff)
downloadaports-0eeb26ab8378dd83978bffabf8527e4c7fbda95e.tar.gz
aports-0eeb26ab8378dd83978bffabf8527e4c7fbda95e.tar.bz2
aports-0eeb26ab8378dd83978bffabf8527e4c7fbda95e.tar.xz
main/libsndfile: modernize
* Patches have been applied upstream, remove.
-rw-r--r--main/libsndfile/APKBUILD23
-rw-r--r--main/libsndfile/CVE-2017-12562.patch88
-rw-r--r--main/libsndfile/CVE-2017-17456_CVE-2017-17457_CVE-2018-19661_CVE-2018-19662.patch88
-rw-r--r--main/libsndfile/CVE-2017-8361_CVE-2017-8363_CVE-2017-8365.patch64
-rw-r--r--main/libsndfile/CVE-2017-8362.patch50
-rw-r--r--main/libsndfile/CVE-2018-13139.patch31
-rw-r--r--main/libsndfile/CVE-2018-19758.patch13
-rw-r--r--main/libsndfile/fix-rf64-varargs-bug.patch30
8 files changed, 3 insertions, 384 deletions
diff --git a/main/libsndfile/APKBUILD b/main/libsndfile/APKBUILD
index 481d8a140c..aa39a1b12c 100644
--- a/main/libsndfile/APKBUILD
+++ b/main/libsndfile/APKBUILD
@@ -11,15 +11,8 @@ subpackages="$pkgname-dev $pkgname-doc"
depends=
depends_dev="flac-dev libvorbis-dev libogg-dev"
makedepends="linux-headers alsa-lib-dev $depends_dev"
-source="http://www.mega-nerd.com/$pkgname/files/$pkgname-$pkgver.tar.gz
- CVE-2017-8361_CVE-2017-8363_CVE-2017-8365.patch
- CVE-2017-8362.patch
- CVE-2017-12562.patch
- CVE-2018-13139.patch
- CVE-2017-17456_CVE-2017-17457_CVE-2018-19661_CVE-2018-19662.patch
- CVE-2018-19758.patch
- fix-rf64-varargs-bug.patch
- "
+source="http://www.mega-nerd.com/$pkgname/files/$pkgname-$pkgver.tar.gz"
+
# sporadic testsuite failures on armhf
case $CARCH in arm*) options="!check";; esac
@@ -49,7 +42,6 @@ case $CARCH in arm*) options="!check";; esac
# - CVE-2017-8365
build() {
- cd "$builddir"
ac_cv_sys_largefile_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
./configure \
--build=$CBUILD \
@@ -61,19 +53,10 @@ build() {
}
check() {
- cd "$builddir"
make check
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
}
-sha512sums="890731a6b8173f714155ce05eaf6d991b31632c8ab207fbae860968861a107552df26fcf85602df2e7f65502c7256c1b41735e1122485a3a07ddb580aa83b57f libsndfile-1.0.28.tar.gz
-f98c40696fca3e7bca867df993de55bb4145c23428e65d1a669182eb2293046478ac727ae7f94bb77123ef0355c3c53be4f9d6a432665c90c74687d8d3afd9e3 CVE-2017-8361_CVE-2017-8363_CVE-2017-8365.patch
-dfd4b5f1c7471fc416eed5c6040580a020543f145de9103751adaad6ce1c5c6a22abc1cf0ffd381aed3072644cd5ee03ba3598265aa7d202d63167da251cb595 CVE-2017-8362.patch
-814139567d90fb07908014e858c341fe933e04dca69b88ad66078910888237bbeba94f85d9e1489883c424f35fca312eb98c21ae2b122d9289bb6418725cd02e CVE-2017-12562.patch
-33817e7c85180635fa239e4ea38973b18312878522639f43071188a995f0e1a35dbca6d133555fb0875292b4b609950ae38e747a6b1949f8ae840db9dc3a2805 CVE-2018-13139.patch
-ba3e5321713dbc118f45dac6f86049a15e6ba54fc788776eb267b1b165a0853bec278d8b066c71372cd243c852faa6781bef6a71d108e7cdbc64fb77fa3afc0a CVE-2017-17456_CVE-2017-17457_CVE-2018-19661_CVE-2018-19662.patch
-ec90d652056166188ccc360d463d7b5549510aca7fcbbb439dd2d6086f759236ece6091c76d0c7074fb09e7b86df229c39ffdd8c8603b253c33d4d05c42615d2 CVE-2018-19758.patch
-0b7ce6bd6c1ec825521974c36b8c6eb5edd17d3c57d5ae3de287fb34a6be7108bc9511abb497538eef36e5883b84f4137fad6fe9a1d150345111de9f068838f9 fix-rf64-varargs-bug.patch"
+sha512sums="890731a6b8173f714155ce05eaf6d991b31632c8ab207fbae860968861a107552df26fcf85602df2e7f65502c7256c1b41735e1122485a3a07ddb580aa83b57f libsndfile-1.0.28.tar.gz"
diff --git a/main/libsndfile/CVE-2017-12562.patch b/main/libsndfile/CVE-2017-12562.patch
deleted file mode 100644
index f195e87e43..0000000000
--- a/main/libsndfile/CVE-2017-12562.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From cf7a8182c2642c50f1cf90dddea9ce96a8bad2e8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= <osmanx@problemloesungsmaschine.de>
-Date: Wed, 14 Jun 2017 12:25:40 +0200
-Subject: [PATCH] src/common.c: Fix heap buffer overflows when writing strings
- in binheader
-
-Fixes the following problems:
- 1. Case 's' only enlarges the buffer by 16 bytes instead of size bytes.
- 2. psf_binheader_writef() enlarges the header buffer (if needed) prior to the
- big switch statement by an amount (16 bytes) which is enough for all cases
- where only a single value gets added. Cases 's', 'S', 'p' however
- additionally write an arbitrary length block of data and again enlarge the
- buffer to the required amount. However, the required space calculation does
- not take into account the size of the length field which gets output before
- the data.
- 3. Buffer size requirement calculation in case 'S' does not account for the
- padding byte ("size += (size & 1) ;" happens after the calculation which
- uses "size").
- 4. Case 'S' can overrun the header buffer by 1 byte when no padding is
- involved
- ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ;" while
- the buffer is only guaranteed to have "size" space available).
- 5. "psf->header.ptr [psf->header.indx] = 0 ;" in case 'S' always writes 1 byte
- beyond the space which is guaranteed to be allocated in the header buffer.
- 6. Case 's' can overrun the provided source string by 1 byte if padding is
- involved ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;"
- where "size" is "strlen (strptr) + 1" (which includes the 0 terminator,
- plus optionally another 1 which is padding and not guaranteed to be
- readable via the source string pointer).
-
-Closes: https://github.com/erikd/libsndfile/issues/292
----
- src/common.c | 15 +++++++--------
- 1 file changed, 7 insertions(+), 8 deletions(-)
-
-diff --git a/src/common.c b/src/common.c
-index 1a6204ca..6b2a2ee9 100644
---- a/src/common.c
-+++ b/src/common.c
-@@ -681,16 +681,16 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
- /* Write a C string (guaranteed to have a zero terminator). */
- strptr = va_arg (argptr, char *) ;
- size = strlen (strptr) + 1 ;
-- size += (size & 1) ;
-
-- if (psf->header.indx + (sf_count_t) size >= psf->header.len && psf_bump_header_allocation (psf, 16))
-+ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1)))
- return count ;
-
- if (psf->rwf_endian == SF_ENDIAN_BIG)
-- header_put_be_int (psf, size) ;
-+ header_put_be_int (psf, size + (size & 1)) ;
- else
-- header_put_le_int (psf, size) ;
-+ header_put_le_int (psf, size + (size & 1)) ;
- memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;
-+ size += (size & 1) ;
- psf->header.indx += size ;
- psf->header.ptr [psf->header.indx - 1] = 0 ;
- count += 4 + size ;
-@@ -703,16 +703,15 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
- */
- strptr = va_arg (argptr, char *) ;
- size = strlen (strptr) ;
-- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
-+ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1)))
- return count ;
- if (psf->rwf_endian == SF_ENDIAN_BIG)
- header_put_be_int (psf, size) ;
- else
- header_put_le_int (psf, size) ;
-- memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ;
-+ memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + (size & 1)) ;
- size += (size & 1) ;
- psf->header.indx += size ;
-- psf->header.ptr [psf->header.indx] = 0 ;
- count += 4 + size ;
- break ;
-
-@@ -724,7 +723,7 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
- size = (size & 1) ? size : size + 1 ;
- size = (size > 254) ? 254 : size ;
-
-- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
-+ if (psf->header.indx + 1 + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, 1 + size))
- return count ;
-
- header_put_byte (psf, size) ;
diff --git a/main/libsndfile/CVE-2017-17456_CVE-2017-17457_CVE-2018-19661_CVE-2018-19662.patch b/main/libsndfile/CVE-2017-17456_CVE-2017-17457_CVE-2018-19661_CVE-2018-19662.patch
deleted file mode 100644
index 5b58114dbe..0000000000
--- a/main/libsndfile/CVE-2017-17456_CVE-2017-17457_CVE-2018-19661_CVE-2018-19662.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-commit 8ddc442d539ca775d80cdbc7af17a718634a743f
-Author: Hugo Lefeuvre <hle@owl.eu.com>
-Date: Mon Dec 24 06:43:48 2018 +0100
-
- a/ulaw: fix multiple buffer overflows (#432)
-
- i2ulaw_array() and i2alaw_array() fail to handle ptr [count] = INT_MIN
- properly, leading to buffer underflow. INT_MIN is a special value
- since - INT_MIN cannot be represented as int.
-
- In this case round - INT_MIN to INT_MAX and proceed as usual.
-
- f2ulaw_array() and f2alaw_array() fail to handle ptr [count] = NaN
- properly, leading to null pointer dereference.
-
- In this case, arbitrarily set the buffer value to 0.
-
- This commit fixes #429 (CVE-2018-19661 and CVE-2018-19662) and
- fixes #344 (CVE-2017-17456 and CVE-2017-17457).
-
-diff --git a/src/alaw.c b/src/alaw.c
-index 063fd1a2..4220224c 100644
---- a/src/alaw.c
-+++ b/src/alaw.c
-@@ -19,6 +19,7 @@
- #include "sfconfig.h"
-
- #include <math.h>
-+#include <limits.h>
-
- #include "sndfile.h"
- #include "common.h"
-@@ -326,7 +327,9 @@ s2alaw_array (const short *ptr, int count, unsigned char *buffer)
- static inline void
- i2alaw_array (const int *ptr, int count, unsigned char *buffer)
- { while (--count >= 0)
-- { if (ptr [count] >= 0)
-+ { if (ptr [count] == INT_MIN)
-+ buffer [count] = alaw_encode [INT_MAX >> (16 + 4)] ;
-+ else if (ptr [count] >= 0)
- buffer [count] = alaw_encode [ptr [count] >> (16 + 4)] ;
- else
- buffer [count] = 0x7F & alaw_encode [- ptr [count] >> (16 + 4)] ;
-@@ -346,7 +349,9 @@ f2alaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
- static inline void
- d2alaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
- { while (--count >= 0)
-- { if (ptr [count] >= 0)
-+ { if (!isfinite (ptr [count]))
-+ buffer [count] = 0 ;
-+ else if (ptr [count] >= 0)
- buffer [count] = alaw_encode [lrint (normfact * ptr [count])] ;
- else
- buffer [count] = 0x7F & alaw_encode [- lrint (normfact * ptr [count])] ;
-diff --git a/src/ulaw.c b/src/ulaw.c
-index e50b4cb5..b6070ade 100644
---- a/src/ulaw.c
-+++ b/src/ulaw.c
-@@ -19,6 +19,7 @@
- #include "sfconfig.h"
-
- #include <math.h>
-+#include <limits.h>
-
- #include "sndfile.h"
- #include "common.h"
-@@ -827,7 +828,9 @@ s2ulaw_array (const short *ptr, int count, unsigned char *buffer)
- static inline void
- i2ulaw_array (const int *ptr, int count, unsigned char *buffer)
- { while (--count >= 0)
-- { if (ptr [count] >= 0)
-+ { if (ptr [count] == INT_MIN)
-+ buffer [count] = ulaw_encode [INT_MAX >> (16 + 2)] ;
-+ else if (ptr [count] >= 0)
- buffer [count] = ulaw_encode [ptr [count] >> (16 + 2)] ;
- else
- buffer [count] = 0x7F & ulaw_encode [-ptr [count] >> (16 + 2)] ;
-@@ -847,7 +850,9 @@ f2ulaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
- static inline void
- d2ulaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
- { while (--count >= 0)
-- { if (ptr [count] >= 0)
-+ { if (!isfinite (ptr [count]))
-+ buffer [count] = 0 ;
-+ else if (ptr [count] >= 0)
- buffer [count] = ulaw_encode [lrint (normfact * ptr [count])] ;
- else
- buffer [count] = 0x7F & ulaw_encode [- lrint (normfact * ptr [count])] ;
diff --git a/main/libsndfile/CVE-2017-8361_CVE-2017-8363_CVE-2017-8365.patch b/main/libsndfile/CVE-2017-8361_CVE-2017-8363_CVE-2017-8365.patch
deleted file mode 100644
index 1dc5b57f1d..0000000000
--- a/main/libsndfile/CVE-2017-8361_CVE-2017-8363_CVE-2017-8365.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From fd0484aba8e51d16af1e3a880f9b8b857b385eb3 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <erikd@mega-nerd.com>
-Date: Wed, 12 Apr 2017 19:45:30 +1000
-Subject: [PATCH] FLAC: Fix a buffer read overrun
-
-Buffer read overrun occurs when reading a FLAC file that switches
-from 2 channels to one channel mid-stream. Only option is to
-abort the read.
-
-Closes: https://github.com/erikd/libsndfile/issues/230
----
- src/common.h | 1 +
- src/flac.c | 13 +++++++++++++
- src/sndfile.c | 1 +
- 3 files changed, 15 insertions(+)
-
-diff --git a/src/common.h b/src/common.h
-index 0bd810c3..e2669b6a 100644
---- a/src/common.h
-+++ b/src/common.h
-@@ -725,6 +725,7 @@ enum
- SFE_FLAC_INIT_DECODER,
- SFE_FLAC_LOST_SYNC,
- SFE_FLAC_BAD_SAMPLE_RATE,
-+ SFE_FLAC_CHANNEL_COUNT_CHANGED,
- SFE_FLAC_UNKOWN_ERROR,
-
- SFE_WVE_NOT_WVE,
-diff --git a/src/flac.c b/src/flac.c
-index 84de0e26..986a7b8f 100644
---- a/src/flac.c
-+++ b/src/flac.c
-@@ -434,6 +434,19 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_
-
- switch (metadata->type)
- { case FLAC__METADATA_TYPE_STREAMINFO :
-+ if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels)
-+ { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n"
-+ "Nothing to be but to error out.\n" ,
-+ psf->sf.channels, metadata->data.stream_info.channels) ;
-+ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
-+ return ;
-+ } ;
-+
-+ if (psf->sf.channels > 0 && psf->sf.samplerate != (int) metadata->data.stream_info.sample_rate)
-+ { psf_log_printf (psf, "Warning: FLAC stream changed sample rates from %d to %d.\n"
-+ "Carrying on as if nothing happened.",
-+ psf->sf.samplerate, metadata->data.stream_info.sample_rate) ;
-+ } ;
- psf->sf.channels = metadata->data.stream_info.channels ;
- psf->sf.samplerate = metadata->data.stream_info.sample_rate ;
- psf->sf.frames = metadata->data.stream_info.total_samples ;
-diff --git a/src/sndfile.c b/src/sndfile.c
-index 41875610..e2a87be8 100644
---- a/src/sndfile.c
-+++ b/src/sndfile.c
-@@ -245,6 +245,7 @@ ErrorStruct SndfileErrors [] =
- { SFE_FLAC_INIT_DECODER , "Error : problem with initialization of the flac decoder." },
- { SFE_FLAC_LOST_SYNC , "Error : flac decoder lost sync." },
- { SFE_FLAC_BAD_SAMPLE_RATE, "Error : flac does not support this sample rate." },
-+ { SFE_FLAC_CHANNEL_COUNT_CHANGED, "Error : flac channel changed mid stream." },
- { SFE_FLAC_UNKOWN_ERROR , "Error : unknown error in flac decoder." },
-
- { SFE_WVE_NOT_WVE , "Error : not a WVE file." },
diff --git a/main/libsndfile/CVE-2017-8362.patch b/main/libsndfile/CVE-2017-8362.patch
deleted file mode 100644
index 54fbfb44c3..0000000000
--- a/main/libsndfile/CVE-2017-8362.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From ef1dbb2df1c0e741486646de40bd638a9c4cd808 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <erikd@mega-nerd.com>
-Date: Fri, 14 Apr 2017 15:19:16 +1000
-Subject: [PATCH] src/flac.c: Fix a buffer read overflow
-
-A file (generated by a fuzzer) which increased the number of channels
-from one frame to the next could cause a read beyond the end of the
-buffer provided by libFLAC. Only option is to abort the read.
-
-Closes: https://github.com/erikd/libsndfile/issues/231
----
- src/flac.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/src/flac.c b/src/flac.c
-index 5a4f8c21..e4f9aaa0 100644
---- a/src/flac.c
-+++ b/src/flac.c
-@@ -169,6 +169,14 @@ flac_buffer_copy (SF_PRIVATE *psf)
- const int32_t* const *buffer = pflac->wbuffer ;
- unsigned i = 0, j, offset, channels, len ;
-
-+ if (psf->sf.channels != (int) frame->header.channels)
-+ { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n"
-+ "Nothing to do but to error out.\n" ,
-+ psf->sf.channels, frame->header.channels) ;
-+ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
-+ return 0 ;
-+ } ;
-+
- /*
- ** frame->header.blocksize is variable and we're using a constant blocksize
- ** of FLAC__MAX_BLOCK_SIZE.
-@@ -202,7 +210,6 @@ flac_buffer_copy (SF_PRIVATE *psf)
- return 0 ;
- } ;
-
--
- len = SF_MIN (pflac->len, frame->header.blocksize) ;
-
- if (pflac->remain % channels != 0)
-@@ -436,7 +443,7 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_
- { case FLAC__METADATA_TYPE_STREAMINFO :
- if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels)
- { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n"
-- "Nothing to be but to error out.\n" ,
-+ "Nothing to do but to error out.\n" ,
- psf->sf.channels, metadata->data.stream_info.channels) ;
- psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
- return ;
diff --git a/main/libsndfile/CVE-2018-13139.patch b/main/libsndfile/CVE-2018-13139.patch
deleted file mode 100644
index f75843267b..0000000000
--- a/main/libsndfile/CVE-2018-13139.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From df18323c622b54221ee7ace74b177cdcccc152d7 Mon Sep 17 00:00:00 2001
-From: "Brett T. Warden" <brett.t.warden@intel.com>
-Date: Tue, 28 Aug 2018 12:01:17 -0700
-Subject: [PATCH] Check MAX_CHANNELS in sndfile-deinterleave
-
-Allocated buffer has space for only 16 channels. Verify that input file
-meets this limit.
-
-Fixes #397
----
- programs/sndfile-deinterleave.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/programs/sndfile-deinterleave.c b/programs/sndfile-deinterleave.c
-index 53660310..225b4d54 100644
---- a/programs/sndfile-deinterleave.c
-+++ b/programs/sndfile-deinterleave.c
-@@ -89,6 +89,13 @@ main (int argc, char **argv)
- exit (1) ;
- } ;
-
-+ if (sfinfo.channels > MAX_CHANNELS)
-+ { printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n",
-+ argv [1], sfinfo.channels, MAX_CHANNELS) ;
-+ exit (1) ;
-+ } ;
-+
-+
- state.channels = sfinfo.channels ;
- sfinfo.channels = 1 ;
-
diff --git a/main/libsndfile/CVE-2018-19758.patch b/main/libsndfile/CVE-2018-19758.patch
deleted file mode 100644
index 7b4e9477bb..0000000000
--- a/main/libsndfile/CVE-2018-19758.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/wav.c.orig
-+++ b/src/wav.c
-@@ -1094,6 +1094,10 @@
- psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */
- psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ;
-
-+ /* Make sure we don't read past the loops array end. */
-+ if (psf->instrument->loop_count > ARRAY_LEN (psf->instrument->loops))
-+ psf->instrument->loop_count = ARRAY_LEN (psf->instrument->loops) ;
-+
- for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++)
- { int type ;
-
diff --git a/main/libsndfile/fix-rf64-varargs-bug.patch b/main/libsndfile/fix-rf64-varargs-bug.patch
deleted file mode 100644
index 37c7c9c166..0000000000
--- a/main/libsndfile/fix-rf64-varargs-bug.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-commit 9d470ee5577d3ccedb1c28c7e0a7295ba17feaf5
-Author: Erik de Castro Lopo <erikd@mega-nerd.com>
-Date: Sun Apr 16 17:54:17 2017 +1000
-
- src/rf64.c: Fix varargs related bug
-
- C's <stargs.h> functionality isn't type checked so that passing an
- `sf_count_t` (64 bits) by mistake in place of a `unit32_t` can cause
- errors. This would be fine if it was an error on every architecture
- and platform, but its not. This particular problem only manifested
- on armhf and some other Arm architectures. It was not an issue on
- 32 bit x86.
-
- I have now fixed variants of this same bug several times.
-
- Closes: https://github.com/erikd/libsndfile/issues/229
-
-diff --git a/src/rf64.c b/src/rf64.c
-index b3d637fa..02dd9046 100644
---- a/src/rf64.c
-+++ b/src/rf64.c
-@@ -742,7 +742,7 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
-
- pad_size = psf->dataoffset - 16 - psf->header.indx ;
- if (pad_size >= 0)
-- psf_binheader_writef (psf, "m4z", PAD_MARKER, pad_size, make_size_t (pad_size)) ;
-+ psf_binheader_writef (psf, "m4z", PAD_MARKER, (unsigned int) pad_size, make_size_t (pad_size)) ;
-
- if (wpriv->rf64_downgrade && (psf->filelength < RIFF_DOWNGRADE_BYTES))
- psf_binheader_writef (psf, "tm8", data_MARKER, psf->datalength) ;