diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-06-28 20:46:19 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-06-30 11:08:39 +0800 |
commit | b6f505ce0ae7bcb05a4ad118753407fd7d022829 (patch) | |
tree | 456dffb7704d582669c51c2b64ab7be759658cc9 /libavcodec | |
parent | 5005b41ad6c461744ab4b163ad4f72a7b5111a7f (diff) | |
download | ffmpeg-b6f505ce0ae7bcb05a4ad118753407fd7d022829.tar.gz |
avcodec/mpeg12dec: Fix uninitialized data in fate-sub-cc-scte20
The issue is introduced in a705bcd763e344fa, please tested with below command line:
make V=1 fate-sub-cc-scte20 TARGET_EXEC="valgrind --error-exitcode=1"
Reported-by: Martin Storsjö <martin@martin.st>
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg12dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index f0f92accf6..e9bdccc384 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2276,6 +2276,8 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, if (ret >= 0) { uint8_t field, cc1, cc2; uint8_t *cap = s1->a53_buf_ref->data; + + memset(s1->a53_buf_ref->data + old_size, 0, cc_count * 3); for (i = 0; i < cc_count && get_bits_left(&gb) >= 26; i++) { skip_bits(&gb, 2); // priority field = get_bits(&gb, 2); |