mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +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:
commit
6c655b40ea
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user