summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-12-06 16:40:05 +0000
committerNils Wallménius <nils@rockbox.org>2010-12-06 16:40:05 +0000
commit8a239cf4f78a34e9429f72921ca7e960b5e169c5 (patch)
tree06740f85a3dd1a0fe6468e5b539ad214fc454ff5 /apps
parent4487107d25b6bd5f9d197439159a6c95d696fff7 (diff)
downloadrockbox-8a239cf4f78a34e9429f72921ca7e960b5e169c5.tar.gz
rockbox-8a239cf4f78a34e9429f72921ca7e960b5e169c5.tar.bz2
rockbox-8a239cf4f78a34e9429f72921ca7e960b5e169c5.zip
libtremor: merge upstream revision 17511 'Add checks/rejection for absurdly huge codebooks.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28745 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/libtremor/codebook.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/codecs/libtremor/codebook.c b/apps/codecs/libtremor/codebook.c
index 860cf07bad..c07b99bce4 100644
--- a/apps/codecs/libtremor/codebook.c
+++ b/apps/codecs/libtremor/codebook.c
@@ -38,6 +38,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: