Browse Source

avcdoec/webp: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 12 years ago
parent
commit
de9cd58848
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/webp.c

+ 1
- 1
libavcodec/webp.c 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)
return AVERROR(EINVAL);

codes = av_malloc(alphabet_size * sizeof(*codes));
codes = av_malloc_array(alphabet_size, sizeof(*codes));
if (!codes)
return AVERROR(ENOMEM);



Loading…
Cancel
Save