Commit 8d12298
Use integer division in TiffBinaryArray::doCount
doCount() uses std::lround(double(size) / typeSize) which rounds
to the nearest integer. When size is not a multiple of typeSize,
this can round up and report more elements than the data holds.
On re-read, the inflated count causes the parser to expect more
data than exists.
Use integer division instead, which truncates and is consistent
with how readTiffEntry computes size from count and typeSize.1 parent 8f5d23c commit 8d12298
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
798 | | - | |
| 798 | + | |
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
| |||
0 commit comments