projects
/
platform
/
upstream
/
libvorbis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix crash on corrupt input file (invalid mode index)
[platform/upstream/libvorbis.git]
/
lib
/
synthesis.c
diff --git
a/lib/synthesis.c
b/lib/synthesis.c
index
6ed554d
..
0f2df63
100644
(file)
--- a/
lib/synthesis.c
+++ b/
lib/synthesis.c
@@
-164,7
+164,7
@@
long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){
/* read our mode and pre/post windowsize */
mode=oggpack_read(&opb,modebits);
}
- if(mode==-1)return(OV_EBADPACKET);
+ if(mode==-1
|| !ci->mode_param[mode]
)return(OV_EBADPACKET);
return(ci->blocksizes[ci->mode_param[mode]->blockflag]);
}