summaryrefslogtreecommitdiff
path: root/libavformat/dsicin.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-12 11:17:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-12 11:19:38 +0200
commit7e88dbe9358fd108dd565c994b6020b95d50c57a (patch)
treed8b180c5338daee4ec214757cc856705646e5e77 /libavformat/dsicin.c
parentae77f06c691d122880dccd808b206b557141aaa7 (diff)
parent48d6556dd46d4f4fac10d0f4a819e314887cd50e (diff)
Merge commit '48d6556dd46d4f4fac10d0f4a819e314887cd50e'
* commit '48d6556dd46d4f4fac10d0f4a819e314887cd50e': dsicin: Add some basic sanity checks for fields read from the file Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/dsicin.c')
-rw-r--r--libavformat/dsicin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
index b8ca57c0a4..4a54680056 100644
--- a/libavformat/dsicin.c
+++ b/libavformat/dsicin.c
@@ -155,6 +155,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;
}