summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-03 04:25:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-03 04:26:57 +0100
commit52334f5be2ef31a5c836f689f3ab95b25bad026a (patch)
tree56ca5a97d7d5f05c30572924e444fabde452acae /libavcodec/tiff.c
parent491ca0e89ff9d3807f7514408ef912a608962163 (diff)
tiff: print error for old style LZW
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index e92967d01e..f70009785f 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -462,6 +462,9 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t *dst, int stride,
src = s->deinvert_buf;
ssrc = src;
}
+ if (size > 1 && !src[0] && (src[1]&1)) {
+ av_log(s->avctx, AV_LOG_ERROR, "Old style LZW is unsupported\n");
+ }
if (ff_lzw_decode_init(s->lzw, 8, src, size, FF_LZW_TIFF) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "Error initializing LZW decoder\n");
return -1;