[FFmpeg-cvslog] avcodec/pcm-dvd: reset last header on errors
Michael Niedermayer
git at videolan.org
Fri Dec 27 03:10:39 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 27 03:00:13 2013 +0100| [f55bc96a5449179ee9b0aab6f0a4581ba1df6b62] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f55bc96a5449179ee9b0aab6f0a4581ba1df6b62
---
libavcodec/pcm-dvd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
index 77da8bf..9b4c40e 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",
More information about the ffmpeg-cvslog
mailing list