We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
marker
int
1 parent adb31d9 commit 6e8cac3Copy full SHA for 6e8cac3
tinyexr.h
@@ -5818,15 +5818,20 @@ static bool ReconstructTileOffsets(OffsetData& offset_data,
5818
5819
} else {
5820
5821
- if ((marker + sizeof(int)) >= (head + size)) {
+ if ((marker + sizeof(uint32_t)) >= (head + size)) {
5822
return false;
5823
}
5824
5825
- int dataSize;
5826
- memcpy(&dataSize, marker, sizeof(int));
+ uint32_t dataSize;
+ memcpy(&dataSize, marker, sizeof(uint32_t));
5827
tinyexr::swap4(&dataSize);
5828
- marker += sizeof(int);
+ marker += sizeof(uint32_t);
5829
+
5830
marker += dataSize;
5831
5832
+ if (marker >= (head + size)) {
5833
+ return false;
5834
+ }
5835
5836
5837
if (!isValidTile(exr_header, offset_data,
0 commit comments