[xiph-commits] r17511 - trunk/Tremor
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Wed Oct 13 13:10:36 PDT 2010
Author: tterribe
Date: 2010-10-13 13:10:36 -0700 (Wed, 13 Oct 2010)
New Revision: 17511
Modified:
trunk/Tremor/codebook.c
Log:
Forward port r14064 from libvorbis.
Add checks/rejection for absurdly huge codebooks.
Modified: trunk/Tremor/codebook.c
===================================================================
--- trunk/Tremor/codebook.c 2010-10-13 20:04:39 UTC (rev 17510)
+++ trunk/Tremor/codebook.c 2010-10-13 20:10:36 UTC (rev 17511)
@@ -37,6 +37,8 @@
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:
More information about the commits
mailing list