Index: third_party/libtiff/tif_strip.c |
diff --git a/third_party/tiff_v403/tif_strip.c b/third_party/libtiff/tif_strip.c |
similarity index 97% |
rename from third_party/tiff_v403/tif_strip.c |
rename to third_party/libtiff/tif_strip.c |
index 2c15a70bdc12d2898a310818245c31cee61cb574..6cac71dd928a3ff3bfcc4d1f1843ca694dc19a3a 100644 |
--- a/third_party/tiff_v403/tif_strip.c |
+++ b/third_party/libtiff/tif_strip.c |
@@ -1,4 +1,4 @@ |
-/* $Id: tif_strip.c,v 1.35 2012-06-06 05:33:55 fwarmerdam Exp $ */ |
+/* $Id: tif_strip.c,v 1.36 2015-06-07 22:35:40 bfriesen Exp $ */ |
/* |
* Copyright (c) 1991-1997 Sam Leffler |
@@ -317,7 +317,14 @@ TIFFScanlineSize64(TIFF* tif) |
} |
} |
else |
+ { |
scanline_size=TIFFhowmany_64(_TIFFMultiply64(tif,td->td_imagewidth,td->td_bitspersample,module),8); |
+ } |
+ if (scanline_size == 0) |
+ { |
+ TIFFErrorExt(tif->tif_clientdata,module,"Computed scanline size is zero"); |
+ return 0; |
+ } |
return(scanline_size); |
} |
tmsize_t |
@@ -328,8 +335,7 @@ TIFFScanlineSize(TIFF* tif) |
tmsize_t n; |
m=TIFFScanlineSize64(tif); |
n=(tmsize_t)m; |
- if ((uint64)n!=m) |
- { |
+ if ((uint64)n!=m) { |
TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow"); |
n=0; |
} |
@@ -381,4 +387,3 @@ TIFFRasterScanlineSize(TIFF* tif) |
* fill-column: 78 |
* End: |
*/ |
- |