diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-06-29 16:04:07 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-06-29 16:04:07 +0200 |
commit | 90bd75e6eb789d196fef0135a58bcfe7904c65c5 (patch) | |
tree | d9438c30af4aeb516219a2eb8870fc3bc4d2f191 /libavcodec/smacker.c | |
parent | a1dbe49d02e916e310cae352836d5c1615b7e101 (diff) | |
download | ffmpeg-90bd75e6eb789d196fef0135a58bcfe7904c65c5.tar.gz |
Avoid a null pointer dereference on oom when decoding smacker.
Fixes ticket #2728.
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r-- | libavcodec/smacker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index d0a10bfdc8..0af11a93b6 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -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; |