parent
712fe9f5b9
commit
c8d613ef49
@ -29,6 +29,7 @@
|
||||
*/
|
||||
#include "tiffiop.h"
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
static int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32);
|
||||
static int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
|
||||
@ -645,10 +646,18 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
|
||||
flip = setorientation(img);
|
||||
if (flip & FLIP_VERTICALLY) {
|
||||
if ((tw + w) > INT_MAX) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
return (0);
|
||||
}
|
||||
y = h - 1;
|
||||
toskew = -(int32)(tw + w);
|
||||
}
|
||||
else {
|
||||
if (tw > (INT_MAX + w)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
return (0);
|
||||
}
|
||||
y = 0;
|
||||
toskew = -(int32)(tw - w);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user