indeo3: Fix a fencepost error.
authorAlex Converse <alex.converse@gmail.com>
Tue, 8 Nov 2011 02:46:46 +0000 (18:46 -0800)
committerAlex Converse <alex.converse@gmail.com>
Tue, 8 Nov 2011 18:59:52 +0000 (10:59 -0800)
Found with asan and the venerable 1-dog.avi sample.

libavcodec/indeo3.c

index 2a929a5..2c7e96b 100644 (file)
@@ -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 */