Skip to content

Commit

Permalink
avformat/oggparseogm: check input size before reading t
Browse files Browse the repository at this point in the history
Makes no difference in outcome, as the checks on t have no effect
when t was uninitialized

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa2b7b5d97c_3598_anOTHERS_DixX_in_Ogg_Sample.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Dec 26, 2013
1 parent 6359872 commit 0875a9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libavformat/oggparseogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ ogm_dshow_header(AVFormatContext *s, int idx)
if(*p != 1)
return 1;

if (os->psize < 100)
return AVERROR_INVALIDDATA;
t = AV_RL32(p + 96);

if(t == 0x05589f80){
Expand Down

0 comments on commit 0875a9e

Please sign in to comment.