[FFmpeg-cvslog] r18224 - trunk/libavcodec/interplayvideo.c
reimar
subversion
Sun Mar 29 19:50:47 CEST 2009
Author: reimar
Date: Sun Mar 29 19:50:46 2009
New Revision: 18224
Log:
Change CHECK_STREAM_PTR macro to correctly handle the (extremely unlikely)
overflow case.
Modified:
trunk/libavcodec/interplayvideo.c
Modified: trunk/libavcodec/interplayvideo.c
==============================================================================
--- trunk/libavcodec/interplayvideo.c Sun Mar 29 19:42:03 2009 (r18223)
+++ trunk/libavcodec/interplayvideo.c Sun Mar 29 19:50:46 2009 (r18224)
@@ -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; \
More information about the ffmpeg-cvslog
mailing list