[FFmpeg-cvslog] indeo3: Fix a fencepost error.

Alex Converse git at videolan.org
Wed Nov 9 03:31:06 CET 2011


ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Mon Nov  7 18:46:46 2011 -0800| [1149fbc7631a8c2258386f9aa247806715493b10] | committer: Alex Converse

indeo3: Fix a fencepost error.

Found with asan and the venerable 1-dog.avi sample.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1149fbc7631a8c2258386f9aa247806715493b10
---

 libavcodec/indeo3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 2a929a5..2c7e96b 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -444,7 +444,7 @@ static int decode_cell_data(Cell *cell, uint8_t *block, uint8_t *ref_block,
                             BUFFER_PRECHECK;
                             dyad1 = bytestream_get_byte(data_ptr);
                             dyad2 = code;
-                            if (dyad1 > delta_tab->num_dyads || dyad1 >= 248)
+                            if (dyad1 >= delta_tab->num_dyads || dyad1 >= 248)
                                 return IV3_BAD_DATA;
                         } else {
                             /* process QUADS */



More information about the ffmpeg-cvslog mailing list