Skip to content

Commit

Permalink
tiff: print error for old style LZW
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Jan 3, 2013
1 parent 491ca0e commit 52334f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libavcodec/tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 52334f5

Please sign in to comment.