blob: 707373d41400556267d834166efa04aa8d110a82 [file] [log] [blame]
Brad Bishop004d4992018-10-02 23:54:45 +02001CVE: CVE-2018-13139
Brad Bishop19323692019-04-05 15:28:33 -04002Upstream-Status: Backport [9dc989eb89cd697e19897afa616d6ab0debe4822]
3Signed-off-by: Ross Burton <ross.burton@intel.com>
Brad Bishop004d4992018-10-02 23:54:45 +02004
Brad Bishop19323692019-04-05 15:28:33 -04005From 9dc989eb89cd697e19897afa616d6ab0debe4822 Mon Sep 17 00:00:00 2001
6From: "Brett T. Warden" <brett.t.warden@intel.com>
7Date: Tue, 28 Aug 2018 12:01:17 -0700
8Subject: [PATCH] Check MAX_CHANNELS in sndfile-deinterleave
9
10Allocated buffer has space for only 16 channels. Verify that input file
11meets this limit.
12
13Fixes #397
Brad Bishop004d4992018-10-02 23:54:45 +020014---
Brad Bishop19323692019-04-05 15:28:33 -040015 programs/sndfile-deinterleave.c | 7 +++++++
16 1 file changed, 7 insertions(+)
Brad Bishop004d4992018-10-02 23:54:45 +020017
18diff --git a/programs/sndfile-deinterleave.c b/programs/sndfile-deinterleave.c
Brad Bishop19323692019-04-05 15:28:33 -040019index e27593e2..cb497e1f 100644
Brad Bishop004d4992018-10-02 23:54:45 +020020--- a/programs/sndfile-deinterleave.c
21+++ b/programs/sndfile-deinterleave.c
Brad Bishop19323692019-04-05 15:28:33 -040022@@ -89,6 +89,13 @@ main (int argc, char **argv)
Brad Bishop004d4992018-10-02 23:54:45 +020023 exit (1) ;
24 } ;
25
26+ if (sfinfo.channels > MAX_CHANNELS)
27+ { printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n",
28+ argv [1], sfinfo.channels, MAX_CHANNELS) ;
29+ exit (1) ;
30+ } ;
31+
Brad Bishop19323692019-04-05 15:28:33 -040032+
Brad Bishop004d4992018-10-02 23:54:45 +020033 state.channels = sfinfo.channels ;
34 sfinfo.channels = 1 ;
35
36--
Brad Bishop19323692019-04-05 15:28:33 -0400372.11.0