[FFmpeg-cvslog] issdemux: Check packet_size for validity
Michael Niedermayer
git at videolan.org
Thu Dec 29 15:40:21 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec 29 05:05:52 2011 +0100| [bf5cc805190b5811b786a454f01cccf9a7e366b9] | committer: Michael Niedermayer
issdemux: Check packet_size for validity
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bf5cc805190b5811b786a454f01cccf9a7e366b9
---
libavformat/iss.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavformat/iss.c b/libavformat/iss.c
index 2bae3c1..bbc8465 100644
--- a/libavformat/iss.c
+++ b/libavformat/iss.c
@@ -87,6 +87,11 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_token(pb, token, sizeof(token)); //Version ID
get_token(pb, token, sizeof(token)); //Size
+ if (iss->packet_size <= 0) {
+ av_log(s, AV_LOG_ERROR, "packet_size %d is invalid\n", iss->packet_size);
+ return AVERROR_INVALIDDATA;
+ }
+
iss->sample_start_pos = avio_tell(pb);
st = avformat_new_stream(s, NULL);
More information about the ffmpeg-cvslog
mailing list