diff options
author | Tim Terriberry <tterribe@xiph.org> | 2010-10-13 20:10:36 +0000 |
---|---|---|
committer | Tim Terriberry <tterribe@xiph.org> | 2010-10-13 20:10:36 +0000 |
commit | 159efc43e59dd8a2ec921f686d929398b8ec319b (patch) | |
tree | b283dd3add921c11cc89d317bf6b19e9c2dd8d50 | |
parent | 58244aa7883406cffdbbdbab972ca36b4816191e (diff) | |
download | tremor-159efc43e59dd8a2ec921f686d929398b8ec319b.tar.gz |
Forward port r14064 from libvorbis.
Add checks/rejection for absurdly huge codebooks.
git-svn-id: https://svn.xiph.org/trunk/Tremor@17511 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r-- | codebook.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -37,6 +37,8 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){ s->entries=oggpack_read(opb,24); if(s->entries==-1)goto _eofout; + if(_ilog(s->dim)+_ilog(s->entries)>24)goto _eofout; + /* codeword ordering.... length ordered or unordered? */ switch((int)oggpack_read(opb,1)){ case 0: |