diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 00:16:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 00:16:25 +0000 |
commit | 0ecca7a49f8e254c12a3a1de048d738bfbb614c6 (patch) | |
tree | 816c7073739d918ca579171204e6d3caf9977da5 /libavformat/aviobuf.c | |
parent | f14d4e7e21c48967c1a877fa9c4eb9943d2c30f5 (diff) | |
download | ffmpeg-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/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index bb55254532..7db4f15515 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -350,6 +350,9 @@ int get_buffer(ByteIOContext *s, unsigned char *buf, int size) int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size) { int len; + + if(size<0) + return -1; len = s->buf_end - s->buf_ptr; if (len == 0) { |