Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: third_party/libtiff/tif_strip.c

Issue 1563103002: XFA: Upgrade to libtiff 4.0.6. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rename to libtiff Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libtiff/tif_read.c ('k') | third_party/libtiff/tif_swab.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
*/
-
« no previous file with comments | « third_party/libtiff/tif_read.c ('k') | third_party/libtiff/tif_swab.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698