From 1149fbc7631a8c2258386f9aa247806715493b10 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Mon, 7 Nov 2011 18:46:46 -0800 Subject: [PATCH] indeo3: Fix a fencepost error. Found with asan and the venerable 1-dog.avi sample. --- libavcodec/indeo3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 2a929a53c7..2c7e96b738 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 */