summaryrefslogtreecommitdiff
path: root/libavcodec/interplayvideo.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-03-29 17:50:46 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-03-29 17:50:46 +0000
commita1f6ffd44d115e9ccc4e1acb2219e7d8bf6c0d58 (patch)
tree64bfbed7281f2f1536380bfd52c2187b15749ace /libavcodec/interplayvideo.c
parent3017d8e9d718e47651d3496fcd92d0789f9b0f97 (diff)
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/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c2
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; \