1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Merge commit 'bbb2945f2dfbc2306c1655bf7eb6e220912a9a7c'

* commit 'bbb2945f2dfbc2306c1655bf7eb6e220912a9a7c':
  smacker: check the return value of smacker_decode_tree

Conflicts:
	libavcodec/smacker.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-06-17 00:36:25 +02:00
commit 6c655b40ea

View File

@ -646,9 +646,16 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
h[i].lengths = av_mallocz(256 * sizeof(int));
h[i].values = av_mallocz(256 * sizeof(int));
skip_bits1(&gb);
res = smacker_decode_tree(&gb, &h[i], 0, 0);
if (res < 0)
return res;
if (smacker_decode_tree(&gb, &h[i], 0, 0) < 0) {
for (; i >= 0; i--) {
if (vlc[i].table)
ff_free_vlc(&vlc[i]);
av_free(h[i].bits);
av_free(h[i].lengths);
av_free(h[i].values);
}
return AVERROR_INVALIDDATA;
}
skip_bits1(&gb);
if(h[i].current > 1) {
res = init_vlc(&vlc[i], SMKTREE_BITS, h[i].length,