1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

avcdoec/webp: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-20 17:35:19 +02:00
parent 8c88ea76df
commit de9cd58848

View File

@ -309,7 +309,7 @@ static int huff_reader_build_canonical(HuffReader *r, int *code_lengths,
if (max_code_length == 0 || max_code_length > MAX_HUFFMAN_CODE_LENGTH) if (max_code_length == 0 || max_code_length > MAX_HUFFMAN_CODE_LENGTH)
return AVERROR(EINVAL); return AVERROR(EINVAL);
codes = av_malloc(alphabet_size * sizeof(*codes)); codes = av_malloc_array(alphabet_size, sizeof(*codes));
if (!codes) if (!codes)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);