mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-04 03:28:05 +00:00
dsicin: Add some basic sanity checks for fields read from the file
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 48d6556dd4
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
b6fc0127ce
commit
e01d623e01
@ -152,6 +152,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user