[xiph-commits] r11066 - trunk/theora/lib
giles at svn.xiph.org
giles at svn.xiph.org
Tue Mar 28 15:33:43 PST 2006
Author: giles
Date: 2006-03-28 15:33:42 -0800 (Tue, 28 Mar 2006)
New Revision: 11066
Modified:
trunk/theora/lib/decode.c
Log:
Check for negative values from theora_read() in huffman decode and
terminate tree traversal if we're out of bits. Note that this isn't
correct for libogg2, only libogg1.
Modified: trunk/theora/lib/decode.c
===================================================================
--- trunk/theora/lib/decode.c 2006-03-28 03:10:31 UTC (rev 11065)
+++ trunk/theora/lib/decode.c 2006-03-28 23:33:42 UTC (rev 11066)
@@ -518,7 +518,8 @@
/* until it hits a leaf at which point we have decoded a token */
while ( CurrentRoot->Value < 0 ){
- theora_read(opb, 1, &ret);
+ theora_read(opb, 1, &ret);
+ if (ret < 0) break; /* out of packet data! */
if (ret)
CurrentRoot = CurrentRoot->OneChild;
else
More information about the commits
mailing list