Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-18 20:57:27 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-12-18 20:58:35 +0300
commitc60caa5769b89ab7dc4aa41a21f87d5ee177bd30 (patch)
tree0856152ef27c7d49c6e8de3d1d67d5cd2ce3a3bf
parent96e2a4ba7402fa711efb8cf8adf4058d4748b71c (diff)
avcodec/indeo3: ensure offsets are non negativen1.2.11
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 368642361f3a589d7b0c23ea327d988edb434e3f) Conflicts: libavcodec/indeo3.c
-rw-r--r--libavcodec/indeo3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index da7dd8394b..48f1866647 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -978,7 +978,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
ctx->y_data_size = ends[0] - starts[0];
ctx->v_data_size = ends[1] - starts[1];
ctx->u_data_size = ends[2] - starts[2];
- if (FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 ||
+ if (FFMIN3(y_offset, v_offset, u_offset) < 0 ||
+ FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 ||
FFMIN3(ctx->y_data_size, ctx->v_data_size, ctx->u_data_size) <= 0) {
av_log(avctx, AV_LOG_ERROR, "One of the y/u/v offsets is invalid\n");
return AVERROR_INVALIDDATA;