[xiph-commits] r14493 - trunk/theora/lib/dec
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Wed Feb 13 01:25:37 PST 2008
Author: tterribe
Date: 2008-02-13 01:25:37 -0800 (Wed, 13 Feb 2008)
New Revision: 14493
Modified:
trunk/theora/lib/dec/huffdec.c
Log:
Fix error-handling in Huffman-tree unpacking code.
Modified: trunk/theora/lib/dec/huffdec.c
===================================================================
--- trunk/theora/lib/dec/huffdec.c 2008-02-13 00:34:56 UTC (rev 14492)
+++ trunk/theora/lib/dec/huffdec.c 2008-02-13 09:25:37 UTC (rev 14493)
@@ -77,7 +77,7 @@
int inext;
nchildren=1<<_node->nbits;
for(i=0;i<nchildren;i=inext){
- inext=i+(1<<_node->nbits-_node->nodes[i]->depth);
+ inext=i+(_node->nodes[i]!=NULL?1<<_node->nbits-_node->nodes[i]->depth:1);
oc_huff_tree_free(_node->nodes[i]);
}
}
@@ -106,6 +106,7 @@
if(ret>=0)ret=oc_huff_tree_unpack(_opb,binode->nodes+1,_depth);
if(ret<0){
oc_huff_tree_free(binode);
+ *_binode=NULL;
return ret;
}
}
More information about the commits
mailing list