diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-02-22 20:47:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-29 03:34:21 +0200 |
commit | 584d90b277d8005a611fb919a1cae2cbb3f23b6f (patch) | |
tree | 4d204f21c39781e024a41714f8db675704d6588b | |
parent | acfe143736d8428918579002c47b84a5d87f03ac (diff) | |
download | ffmpeg-584d90b277d8005a611fb919a1cae2cbb3f23b6f.tar.gz |
avcodec/a64multienc: initialize mc_meta_charset to zero
This fixes the use of uninitialized values in avpriv_do_elbg.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab759f8f4a3f7178361e32ab719e6bc49d8afecb)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/a64multienc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 889e8eb670..9f3bc0d64d 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -220,7 +220,7 @@ static av_cold int a64multi_encode_init(AVCodecContext *avctx) a64_palette[mc_colors[a]][2] * 0.11; } - if (!(c->mc_meta_charset = av_malloc_array(c->mc_lifetime, 32000 * sizeof(int))) || + if (!(c->mc_meta_charset = av_mallocz_array(c->mc_lifetime, 32000 * sizeof(int))) || !(c->mc_best_cb = av_malloc(CHARSET_CHARS * 32 * sizeof(int))) || !(c->mc_charmap = av_mallocz_array(c->mc_lifetime, 1000 * sizeof(int))) || !(c->mc_colram = av_mallocz(CHARSET_CHARS * sizeof(uint8_t))) || |