Mercurial > libavcodec.hg
changeset 9276:c80d14982fba libavcodec
Change CHECK_STREAM_PTR macro to correctly handle the (extremely unlikely)
overflow case.
author | reimar |
---|---|
date | Sun, 29 Mar 2009 17:50:46 +0000 |
parents | 67cf9d31724c |
children | b8e5b7edb2d5 |
files | interplayvideo.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/interplayvideo.c Sun Mar 29 17:42:03 2009 +0000 +++ b/interplayvideo.c Sun Mar 29 17:50:46 2009 +0000 @@ -76,7 +76,7 @@ } 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; \