Commit 90bd75e6 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Avoid a null pointer dereference on oom when decoding smacker.

Fixes ticket #2728.
parent a1dbe49d
......@@ -261,6 +261,8 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
huff.maxlength = 0;
huff.current = 0;
huff.values = av_mallocz(huff.length * sizeof(int));
if (!huff.values)
return AVERROR(ENOMEM);
if (smacker_decode_bigtree(gb, &huff, &ctx) < 0)
err = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment