diff options
author | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2015-05-31 21:19:07 +0000 |
---|---|---|
committer | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2015-05-31 21:19:07 +0000 |
commit | e69b354c3ed04275c6c06e045493a1af462481dc (patch) | |
tree | 4d18e1a43a678720361066f092c7bef013292a41 /libtiff/tif_luv.c | |
parent | cf2cbabef1dd14a2f7f6cea79b1fbd2fb0344ae9 (diff) | |
download | libtiff-git-e69b354c3ed04275c6c06e045493a1af462481dc.tar.gz |
* libtiff/tif_luv.c (LogLuvDecodeTile): Fix Coverity 991227
"Division or modulo by zero".
Diffstat (limited to 'libtiff/tif_luv.c')
-rw-r--r-- | libtiff/tif_luv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libtiff/tif_luv.c b/libtiff/tif_luv.c index eba6c08e..e462d628 100644 --- a/libtiff/tif_luv.c +++ b/libtiff/tif_luv.c @@ -1,4 +1,4 @@ -/* $Id: tif_luv.c,v 1.35 2011-04-02 20:54:09 bfriesen Exp $ */ +/* $Id: tif_luv.c,v 1.36 2015-05-31 21:19:07 bfriesen Exp $ */ /* * Copyright (c) 1997 Greg Ward Larson @@ -395,6 +395,9 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { tmsize_t rowlen = TIFFTileRowSize(tif); + if (rowlen == 0) + return 0; + assert(cc%rowlen == 0); while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) bp += rowlen, cc -= rowlen; |