diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-27 03:00:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-27 03:00:52 +0100 |
commit | f55bc96a5449179ee9b0aab6f0a4581ba1df6b62 (patch) | |
tree | 8106e2b1f008bfc39455259439e87ba72eaa0417 | |
parent | 42b6805cc1989f759f19e9d253527311741cbd3a (diff) | |
download | ffmpeg-f55bc96a5449179ee9b0aab6f0a4581ba1df6b62.tar.gz |
avcodec/pcm-dvd: reset last header on errors
Fixes: msan_uninit-mem_7f4fff975a2c_4957_dvd_audio_sample.aob
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/pcm-dvd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c index 77da8bf7e7..9b4c40ee22 100644 --- a/libavcodec/pcm-dvd.c +++ b/libavcodec/pcm-dvd.c @@ -70,6 +70,7 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header) /* early exit if the header didn't change apart from the frame number */ if (s->last_header == header_int) return 0; + s->last_header = -1; if (avctx->debug & FF_DEBUG_PICT_INFO) av_dlog(avctx, "pcm_dvd_parse_header: header = %02x%02x%02x\n", |