OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d702d6
)
Fix nodes[nb_codes*2-1].count being uninitialized and used to initialize
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 1 Dec 2007 09:39:59 +0000
(09:39 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 1 Dec 2007 09:39:59 +0000
(09:39 +0000)
nodes[nb_codes*2-2].count (thus making that invalid as well) in
ff_huff_build_tree.
Might fix some (hard to reproduce) crashes in VP6 decoder.
Originally committed as revision 11119 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/huffman.c
patch
|
blob
|
history
diff --git
a/libavcodec/huffman.c
b/libavcodec/huffman.c
index
f75346f
..
43a7855
100644
(file)
--- a/
libavcodec/huffman.c
+++ b/
libavcodec/huffman.c
@@
-82,6
+82,7
@@
int ff_huff_build_tree(AVCodecContext *avctx, VLC *vlc, int nb_codes,
}
qsort(nodes, nb_codes, sizeof(Node), cmp);
cur_node = nb_codes;
+ nodes[nb_codes*2-1].count = 0;
for(i = 0; i < nb_codes*2-1; i += 2){
nodes[cur_node].sym = HNODE;
nodes[cur_node].count = nodes[i].count + nodes[i+1].count;