projects
/
platform
/
upstream
/
libvorbis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89f651f
)
Sanity check number of channels in setup.
author
Thomas Daede
<daede003@umn.edu>
Thu, 17 May 2018 23:19:19 +0000
(16:19 -0700)
committer
Thomas Daede
<daede003@umn.edu>
Thu, 17 May 2018 23:23:55 +0000
(16:23 -0700)
Fixes #2335.
lib/vorbisenc.c
patch
|
blob
|
history
diff --git
a/lib/vorbisenc.c
b/lib/vorbisenc.c
index
4fc7b62
..
64a51b5
100644
(file)
--- a/
lib/vorbisenc.c
+++ b/
lib/vorbisenc.c
@@
-684,6
+684,7
@@
int vorbis_encode_setup_init(vorbis_info *vi){
highlevel_encode_setup *hi=&ci->hi;
if(ci==NULL)return(OV_EINVAL);
+ if(vi->channels<1||vi->channels>255)return(OV_EINVAL);
if(!hi->impulse_block_p)i0=1;
/* too low/high an ATH floater is nonsensical, but doesn't break anything */