Skip to content

Commit 176d439

Browse files
Fix tiff tile out-of-bounds
1 parent 2c4db22 commit 176d439

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/formats/tiff/tiff_image.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class TiffImage {
400400

401401
for (var y = 0, py = outY; y < tileHeight; ++y, ++py) {
402402
for (var x = 0, px = outX; x < tileWidth; ++x, ++px) {
403-
if (byteData.isEOS) {
403+
if (byteData.isEOS || px >= width || py >= height) {
404404
break;
405405
}
406406
if (samplesPerPixel == 1) {

0 commit comments

Comments
 (0)