Only add new tags to the queue if the offset is greater than the current, fixing infinite loop

pull/56/head
Paul van Santen 2021-03-30 11:11:04 +02:00
parent 827ecdad3d
commit 02f29239d2
No known key found for this signature in database
GPG Key ID: AD10F40CB69516B6
1 changed files with 1 additions and 1 deletions

View File

@ -1445,7 +1445,7 @@ func (ie *IfdEnumerate) Collect(rootIfdOffset uint32) (index IfdIndex, err error
}
// If there's another IFD in the chain.
if nextIfdOffset != 0 {
if nextIfdOffset > offset {
iiSibling := ii.NewSibling(ii.Index() + 1)
// Allow the next link to know what the previous link was.