Skip to content

Commit

Permalink
Fix tiff tile out-of-bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-duncan committed Jan 9, 2025
1 parent 2c4db22 commit 176d439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/formats/tiff/tiff_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class TiffImage {

for (var y = 0, py = outY; y < tileHeight; ++y, ++py) {
for (var x = 0, px = outX; x < tileWidth; ++x, ++px) {
if (byteData.isEOS) {
if (byteData.isEOS || px >= width || py >= height) {
break;
}
if (samplesPerPixel == 1) {
Expand Down

0 comments on commit 176d439

Please sign in to comment.