mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-19 05:14:31 +00:00
Avoid unsigned overflow/truncation from bad offset values in invalid object files
This commit is contained in:
+1
-1
@@ -550,7 +550,7 @@ static void applyFilePatches(Section §ion, Section &dataSection) {
|
||||
verbosePrint(VERB_INFO, "Patching section \"%s\"...\n", section.name.c_str());
|
||||
for (Patch &patch : section.patches) {
|
||||
int32_t value = computeRPNExpr(patch, *section.fileSymbols);
|
||||
uint16_t offset = patch.offset + section.offset;
|
||||
uint32_t offset = patch.offset + section.offset;
|
||||
|
||||
uint8_t typeSizes[PATCHTYPE_INVALID] = {
|
||||
1, // PATCHTYPE_BYTE
|
||||
|
||||
Reference in New Issue
Block a user