mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Avoid a null pointer dereference on oom when decoding smacker.
Fixes ticket #2728.
This commit is contained in:
parent
a1dbe49d02
commit
90bd75e6eb
@ -261,6 +261,8 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
|
|||||||
huff.maxlength = 0;
|
huff.maxlength = 0;
|
||||||
huff.current = 0;
|
huff.current = 0;
|
||||||
huff.values = av_mallocz(huff.length * sizeof(int));
|
huff.values = av_mallocz(huff.length * sizeof(int));
|
||||||
|
if (!huff.values)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
if (smacker_decode_bigtree(gb, &huff, &ctx) < 0)
|
if (smacker_decode_bigtree(gb, &huff, &ctx) < 0)
|
||||||
err = -1;
|
err = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user