mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-04 22:30:25 +00:00
avcodec/msmpeg4dec: initialize dir_ptr in error cases
Fixes use of uinitialized memory Fixes: msan_uninit-mem_7f01b8799186_7278_msnaudio.asf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
81230e2612
commit
61edda9a4a
@ -588,6 +588,7 @@ static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
|
|||||||
}
|
}
|
||||||
if (level < 0) {
|
if (level < 0) {
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
|
av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
|
||||||
|
*dir_ptr = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
level-=256;
|
level-=256;
|
||||||
@ -599,6 +600,7 @@ static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
|
|||||||
}
|
}
|
||||||
if (level < 0){
|
if (level < 0){
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
|
av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
|
||||||
|
*dir_ptr = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user