diff --git a/src/add-ons/translators/tifftranslator/TiffIfd.cpp b/src/add-ons/translators/tifftranslator/TiffIfd.cpp index b5daa12a85..ba879465ca 100755 --- a/src/add-ons/translators/tifftranslator/TiffIfd.cpp +++ b/src/add-ons/translators/tifftranslator/TiffIfd.cpp @@ -97,6 +97,16 @@ TiffIfd::LoadFields(uint32 offset, BPositionIO &io, swap_action swp) finitStatus = fpfields[i]->InitCheck(); return; } + } // for (i = 0; i < ffieldCount; i++, offset += 12) + + // Read address of next IFD entry + if (io.ReadAt(offset, &fnextIFDOffset, 4) != 4) { + finitStatus = B_IO_ERROR; + return; + } + if (swap_data(B_UINT32_TYPE, &nextIFDOffset, 4, swp) != B_OK) { + finitStauts = B_ERROR; + return; } } } diff --git a/src/add-ons/translators/tifftranslator/TiffIfd.h b/src/add-ons/translators/tifftranslator/TiffIfd.h index 5ffa142258..c838169fbf 100755 --- a/src/add-ons/translators/tifftranslator/TiffIfd.h +++ b/src/add-ons/translators/tifftranslator/TiffIfd.h @@ -66,6 +66,8 @@ public: bool HasField(uint16 tag); uint32 GetCount(uint16 tag); // throws: TiffIfdFieldNotFoundException() + + uint32 GetNextIfdOffset() { return fnextIFDOffset; }; uint32 GetUint(uint16 tag, uint32 index = 0); // index is the base one index for the desired