Commit 139cec79 authored by reimar's avatar reimar

Change CHECK_STREAM_PTR macro to correctly handle the (extremely unlikely)

overflow case.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18224 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c07dd69d
...@@ -76,7 +76,7 @@ typedef struct IpvideoContext { ...@@ -76,7 +76,7 @@ typedef struct IpvideoContext {
} IpvideoContext; } IpvideoContext;
#define CHECK_STREAM_PTR(n) \ #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", \ 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); \ s->stream_ptr + n, s->stream_end); \
return -1; \ return -1; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment