mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
avcdoec/webp: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8c88ea76df
commit
de9cd58848
@ -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)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
codes = av_malloc(alphabet_size * sizeof(*codes));
|
||||
codes = av_malloc_array(alphabet_size, sizeof(*codes));
|
||||
if (!codes)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user