aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/4xm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-12 00:16:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-12 00:16:25 +0000
commit0ecca7a49f8e254c12a3a1de048d738bfbb614c6 (patch)
tree816c7073739d918ca579171204e6d3caf9977da5 /libavformat/4xm.c
parentf14d4e7e21c48967c1a877fa9c4eb9943d2c30f5 (diff)
downloadffmpeg-0ecca7a49f8e254c12a3a1de048d738bfbb614c6.tar.gz
various security fixes and precautionary checks
Originally committed as revision 3822 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/4xm.c')
-rw-r--r--libavformat/4xm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 39e1e87061..73d6377245 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -279,7 +279,7 @@ static int fourxm_read_packet(AVFormatContext *s,
/* allocate 8 more bytes than 'size' to account for fourcc
* and size */
- if (av_new_packet(pkt, size + 8))
+ if (size + 8 < size || av_new_packet(pkt, size + 8))
return AVERROR_IO;
pkt->stream_index = fourxm->video_stream_index;
pkt->pts = fourxm->video_pts;