From 07ef7b1a303680b73fc4a014f74a6d5089725184 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 4 Aug 2012 17:07:26 +0200 Subject: [PATCH] lavf/img2dec: fix out-of-range check in find_image_range() Take the new parameter start_index into account. --- libavformat/img2dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index e531214427..63a2a598b5 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -135,7 +135,7 @@ static int find_image_range(int *pfirst_index, int *plast_index, if (avio_check(buf, AVIO_FLAG_READ) > 0) break; } - if (first_index == 5) + if (first_index == start_index + 5) goto fail; /* find the last image */