[FFmpeg-devel] [PATCH] lavf/img2dec: fix out-of-range check in find_image_range()
Stefano Sabatini
stefasab at gmail.com
Sat Aug 4 18:39:12 CEST 2012
Take into account the new parameter start_index.
---
libavformat/img2dec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 90ad4ca..25aa3ce 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 */
--
1.7.5.4
More information about the ffmpeg-devel
mailing list