diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-29 17:50:46 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-29 17:50:46 +0000 |
commit | a1f6ffd44d115e9ccc4e1acb2219e7d8bf6c0d58 (patch) | |
tree | 64bfbed7281f2f1536380bfd52c2187b15749ace /libavcodec | |
parent | 3017d8e9d718e47651d3496fcd92d0789f9b0f97 (diff) | |
download | ffmpeg-a1f6ffd44d115e9ccc4e1acb2219e7d8bf6c0d58.tar.gz |
Change CHECK_STREAM_PTR macro to correctly handle the (extremely unlikely)
overflow case.
Originally committed as revision 18224 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/interplayvideo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index 529c3193ef..2fcc911967 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -76,7 +76,7 @@ typedef struct IpvideoContext { } IpvideoContext; #define CHECK_STREAM_PTR(n) \ - if ((s->stream_ptr + n) > s->stream_end) { \ + if (s->stream_end - s->stream_ptr < n) { \ av_log(s->avctx, AV_LOG_ERROR, "Interplay video warning: stream_ptr out of bounds (%p >= %p)\n", \ s->stream_ptr + n, s->stream_end); \ return -1; \ |