projects
/
platform
/
upstream
/
libsndfile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba96db7
)
Check MAX_CHANNELS in sndfile-deinterleave
73/211473/1
author
Brett T. Warden
<brett.t.warden@intel.com>
Tue, 28 Aug 2018 19:01:17 +0000
(12:01 -0700)
committer
Seungbae Shin
<seungbae.shin@samsung.com>
Mon, 5 Aug 2019 12:29:13 +0000
(21:29 +0900)
Allocated buffer has space for only 16 channels. Verify that input file
meets this limit.
Fixes #397
Change-Id: I615bbd5419dddf8de0db60ab2a7db16b53d15ff4
programs/sndfile-deinterleave.c
patch
|
blob
|
history
diff --git
a/programs/sndfile-deinterleave.c
b/programs/sndfile-deinterleave.c
index
e27593e
..
cb497e1
100644
(file)
--- a/
programs/sndfile-deinterleave.c
+++ b/
programs/sndfile-deinterleave.c
@@
-89,6
+89,13
@@
main (int argc, char **argv)
exit (1) ;
} ;
+ if (sfinfo.channels > MAX_CHANNELS)
+ { printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n",
+ argv [1], sfinfo.channels, MAX_CHANNELS) ;
+ exit (1) ;
+ } ;
+
+
state.channels = sfinfo.channels ;
sfinfo.channels = 1 ;