Blame SOURCES/libsndfile-1.0.28-CVE_2018_13139.patch

8d8ca0
From df18323c622b54221ee7ace74b177cdcccc152d7 Mon Sep 17 00:00:00 2001
8d8ca0
From: "Brett T. Warden" <brett.t.warden@intel.com>
8d8ca0
Date: Tue, 28 Aug 2018 12:01:17 -0700
8d8ca0
Subject: [PATCH] Check MAX_CHANNELS in sndfile-deinterleave
8d8ca0
8d8ca0
Allocated buffer has space for only 16 channels. Verify that input file
8d8ca0
meets this limit.
8d8ca0
8d8ca0
Fixes #397
8d8ca0
---
8d8ca0
 programs/sndfile-deinterleave.c | 7 +++++++
8d8ca0
 1 file changed, 7 insertions(+)
8d8ca0
8d8ca0
diff --git a/programs/sndfile-deinterleave.c b/programs/sndfile-deinterleave.c
8d8ca0
index 53660310..225b4d54 100644
8d8ca0
--- a/programs/sndfile-deinterleave.c
8d8ca0
+++ b/programs/sndfile-deinterleave.c
8d8ca0
@@ -89,6 +89,13 @@ main (int argc, char **argv)
8d8ca0
 		exit (1) ;
8d8ca0
 		} ;
8d8ca0
 
8d8ca0
+	if (sfinfo.channels > MAX_CHANNELS)
8d8ca0
+	{	printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n",
8d8ca0
+			argv [1], sfinfo.channels, MAX_CHANNELS) ;
8d8ca0
+		exit (1) ;
8d8ca0
+		} ;
8d8ca0
+
8d8ca0
+
8d8ca0
 	state.channels = sfinfo.channels ;
8d8ca0
 	sfinfo.channels = 1 ;
8d8ca0