[xiph-commits] r17528 - trunk/Tremor

tterribe at svn.xiph.org tterribe at svn.xiph.org
Wed Oct 13 18:17:08 PDT 2010


Author: tterribe
Date: 2010-10-13 18:17:08 -0700 (Wed, 13 Oct 2010)
New Revision: 17528

Modified:
   trunk/Tremor/codebook.c
Log:
Port r16597 from libvorbis.

Don't allow ordered codebooks with codeword lengths longer than 32 bits.


Modified: trunk/Tremor/codebook.c
===================================================================
--- trunk/Tremor/codebook.c	2010-10-14 01:12:30 UTC (rev 17527)
+++ trunk/Tremor/codebook.c	2010-10-14 01:17:08 UTC (rev 17528)
@@ -76,6 +76,7 @@
       for(i=0;i<s->entries;){
 	long num=oggpack_read(opb,_ilog(s->entries-i));
 	if(num==-1)goto _eofout;
+	if(length>32)goto _errout;
 	for(j=0;j<num && i<s->entries;j++,i++)
 	  s->lengthlist[i]=length;
 	length++;



More information about the commits mailing list