Brad Bishop | 004d499 | 2018-10-02 23:54:45 +0200 | [diff] [blame] | 1 | CVE: CVE-2018-13139 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 2 | Upstream-Status: Backport [9dc989eb89cd697e19897afa616d6ab0debe4822] |
| 3 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
Brad Bishop | 004d499 | 2018-10-02 23:54:45 +0200 | [diff] [blame] | 4 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | From 9dc989eb89cd697e19897afa616d6ab0debe4822 Mon Sep 17 00:00:00 2001 |
| 6 | From: "Brett T. Warden" <brett.t.warden@intel.com> |
| 7 | Date: Tue, 28 Aug 2018 12:01:17 -0700 |
| 8 | Subject: [PATCH] Check MAX_CHANNELS in sndfile-deinterleave |
| 9 | |
| 10 | Allocated buffer has space for only 16 channels. Verify that input file |
| 11 | meets this limit. |
| 12 | |
| 13 | Fixes #397 |
Brad Bishop | 004d499 | 2018-10-02 23:54:45 +0200 | [diff] [blame] | 14 | --- |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | programs/sndfile-deinterleave.c | 7 +++++++ |
| 16 | 1 file changed, 7 insertions(+) |
Brad Bishop | 004d499 | 2018-10-02 23:54:45 +0200 | [diff] [blame] | 17 | |
| 18 | diff --git a/programs/sndfile-deinterleave.c b/programs/sndfile-deinterleave.c |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | index e27593e2..cb497e1f 100644 |
Brad Bishop | 004d499 | 2018-10-02 23:54:45 +0200 | [diff] [blame] | 20 | --- a/programs/sndfile-deinterleave.c |
| 21 | +++ b/programs/sndfile-deinterleave.c |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | @@ -89,6 +89,13 @@ main (int argc, char **argv) |
Brad Bishop | 004d499 | 2018-10-02 23:54:45 +0200 | [diff] [blame] | 23 | 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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 32 | + |
Brad Bishop | 004d499 | 2018-10-02 23:54:45 +0200 | [diff] [blame] | 33 | state.channels = sfinfo.channels ; |
| 34 | sfinfo.channels = 1 ; |
| 35 | |
| 36 | -- |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 37 | 2.11.0 |