summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-03-06 17:00:29 -0800
committerAlex Converse <alex.converse@gmail.com>2012-03-07 15:40:42 -0800
commitfd0be63049ed46660993d0550a4f0847a0b942ea (patch)
treecfa710b8589d56784f7979b1ec7dfb7832d4ab70 /libavcodec/tiff.c
parent94f1b11a6fdfc43e48ffa4d29ba48f6ec3ba39d1 (diff)
tiffdec: Prevent illegal memory access caused by recycled pointers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 0ff6ceb7cc..9ca91636a1 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -535,6 +535,8 @@ static int decode_frame(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "The answer to life, universe and everything is not correct!\n");
return -1;
}
+ // Reset these pointers so we can tell if they were set this frame
+ s->stripsizes = s->stripdata = NULL;
/* parse image file directory */
off = tget_long(&buf, le);
if (off >= UINT_MAX - 14 || end_buf - orig_buf < off + 14) {