[FFmpeg-devel] [PATCH 2/2] avcodec/exif: do not follow 0 offsets
Michael Niedermayer
michaelni at gmx.at
Sun Apr 20 04:22:29 CEST 2014
Fixes exif decoding failure of 1295328_300.jpg
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/exif.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index 0f3f80c..a980da2 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -78,6 +78,11 @@ static int exif_decode_tag(AVCodecContext *avctx, GetByteContext *gbytes, int le
ff_tread_tag(gbytes, le, &id, &type, &count, &cur_pos);
+ if (!bytestream2_tell(gbytes)) {
+ bytestream2_seek(gbytes, cur_pos, SEEK_SET);
+ return 0;
+ }
+
// read count values and add it metadata
// store metadata or proceed with next IFD
ret = ff_tis_ifd(id);
--
1.7.9.5
More information about the ffmpeg-devel
mailing list