[FFmpeg-cvslog] avcodec/shorten: Fix code depending on signed overflow behavior
Michael Niedermayer
git at videolan.org
Sat May 16 00:16:24 CEST 2015
ffmpeg | branch: release/2.6 | Michael Niedermayer <michaelni at gmx.at> | Fri May 15 16:58:51 2015 +0200| [f33bd39d27424ed2d21e8059abc2506c5e0a5fbd] | committer: Michael Niedermayer
avcodec/shorten: Fix code depending on signed overflow behavior
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 2d15588124ab1d4c0612cab66f02a716f1509211)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f33bd39d27424ed2d21e8059abc2506c5e0a5fbd
---
libavcodec/shorten.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index deae0fa..804efe3 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -129,8 +129,7 @@ static int allocate_buffers(ShortenContext *s)
av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n");
return AVERROR_INVALIDDATA;
}
- if (s->blocksize + s->nwrap >= UINT_MAX / sizeof(int32_t) ||
- s->blocksize + s->nwrap <= (unsigned)s->nwrap) {
+ if (s->blocksize + (uint64_t)s->nwrap >= UINT_MAX / sizeof(int32_t)) {
av_log(s->avctx, AV_LOG_ERROR,
"s->blocksize + s->nwrap too large\n");
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list