[SCM] sox/master: Add xa-validate-channel-count patch. (Closes: #881121)
mira-guest at users.alioth.debian.org
mira-guest at users.alioth.debian.org
Sat Nov 18 22:48:09 UTC 2017
The following commit has been merged in the master branch:
commit 710b998124cedfe1d12b4c32c0d6a6cd415f0690
Author: Jaromír Mikeš <mira.mikes at seznam.cz>
Date: Sat Nov 18 23:27:20 2017 +0100
Add xa-validate-channel-count patch. (Closes: #881121)
diff --git a/debian/patches/0012-xa-validate-channel-count.patch b/debian/patches/0012-xa-validate-channel-count.patch
new file mode 100644
index 0000000..fd04bcd
--- /dev/null
+++ b/debian/patches/0012-xa-validate-channel-count.patch
@@ -0,0 +1,30 @@
+Description: A corrupt header specifying zero channels would send read_channels()
+into an infinite loop. Prevent this by sanity checking the channel
+count in open_read(). Also add an upper bound to prevent overflow
+in multiplication.
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881121
+Author: Mans Rullgard <mans at mansr.com>
+ Jaromír Mikeš <mira.mikes at seznam.cz>
+Forwarded: not-needed
+
+---
+ src/xa.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+Index: sox/src/xa.c
+===================================================================
+--- sox.orig/src/xa.c
++++ sox/src/xa.c
+@@ -143,6 +143,12 @@ static int startread(sox_format_t * ft)
+ lsx_report("User options overriding rate read in .xa header");
+ }
+
++ if (ft->signal.channels == 0 || ft->signal.channels > UINT16_MAX) {
++ lsx_fail_errno(ft, SOX_EFMT, "invalid channel count %d",
++ ft->signal.channels);
++ return SOX_EOF;
++ }
++
+ /* Check for supported formats */
+ if (ft->encoding.bits_per_sample != 16) {
+ lsx_fail_errno(ft, SOX_EFMT, "%d-bit sample resolution not supported.",
diff --git a/debian/patches/series b/debian/patches/series
index 1fc09ea..abc9204 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
0009-CVE-2017-11359.patch
0010-wavpack_check_errors.patch
0011-lintian-man-sox.patch
+0012-xa-validate-channel-count.patch
--
sox packaging
More information about the pkg-multimedia-commits
mailing list