Browse Source

Fix an exploit in indeo by checking we are not writing out of the strip array.

Fixes issue 655

Originally committed as revision 16802 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Benoit Fouet 16 years ago
parent
commit
a44cb89b0f
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      libavcodec/indeo3.c

+ 8
- 0
libavcodec/indeo3.c View File

@@ -252,6 +252,10 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s,

if(cmd == 0) {
strip++;
if(strip >= strip_tbl + FF_ARRAY_ELEMS(strip_tbl)) {
av_log(s->avctx, AV_LOG_WARNING, "out of range strip\n");
break;
}
memcpy(strip, strip-1, sizeof(*strip));
strip->split_flag = 1;
strip->split_direction = 0;
@@ -259,6 +263,10 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s,
continue;
} else if(cmd == 1) {
strip++;
if(strip >= strip_tbl + FF_ARRAY_ELEMS(strip_tbl)) {
av_log(s->avctx, AV_LOG_WARNING, "out of range strip\n");
break;
}
memcpy(strip, strip-1, sizeof(*strip));
strip->split_flag = 1;
strip->split_direction = 1;


Loading…
Cancel
Save