[FFmpeg-cvslog] dsicin: Add some basic sanity checks for fields read from the file
Martin Storsjö
git at videolan.org
Thu Sep 12 11:26:35 CEST 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Sep 11 15:13:48 2013 +0300| [48d6556dd46d4f4fac10d0f4a819e314887cd50e] | committer: Martin Storsjö
dsicin: Add some basic sanity checks for fields read from the file
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=48d6556dd46d4f4fac10d0f4a819e314887cd50e
---
libavformat/dsicin.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
index ecc8c0b..6a7c8b9 100644
--- a/libavformat/dsicin.c
+++ b/libavformat/dsicin.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list