Skip to content

Commit

Permalink
dsicin: Add some basic sanity checks for fields read from the file
Browse files Browse the repository at this point in the history
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
Signed-off-by: Martin Storsjö <[email protected]>
  • Loading branch information
mstorsjo committed Sep 11, 2013
1 parent 5045f6b commit 48d6556
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libavformat/dsicin.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ static int cin_read_frame_header(CinDemuxContext *cin, AVIOContext *pb) {

if (avio_rl32(pb) != 0xAA55AA55)
return AVERROR_INVALIDDATA;
if (hdr->video_frame_size < 0 || hdr->audio_frame_size < 0)
return AVERROR_INVALIDDATA;

return 0;
}
Expand Down

0 comments on commit 48d6556

Please sign in to comment.