diff options
author | alpine-mips-patches <info@mobile-stream.com> | 2018-12-10 07:19:22 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-12-18 07:33:37 +0000 |
commit | 6fad0b1c8897d2e145bddf22e6d3c5660706f480 (patch) | |
tree | 27f599e112ea15196fa8cc245dcf427c8e997585 /main/libsndfile/fix-rf64-varargs-bug.patch | |
parent | df7f7f3fdca88258690ddaf163dfdcb50a72f4bd (diff) |
main/libsndfile: fix varargs bug on mips{el}
This upstream patch fixes multi.rf64 test failure on mipsel{n8hf} at least.
Note the bug was reported for armv7hl so arm* check() should probably be re-enabled.
Diffstat (limited to 'main/libsndfile/fix-rf64-varargs-bug.patch')
-rw-r--r-- | main/libsndfile/fix-rf64-varargs-bug.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/libsndfile/fix-rf64-varargs-bug.patch b/main/libsndfile/fix-rf64-varargs-bug.patch new file mode 100644 index 00000000000..37c7c9c166b --- /dev/null +++ b/main/libsndfile/fix-rf64-varargs-bug.patch @@ -0,0 +1,30 @@ +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) ; |