Fixed use-after-free in Assembler

Use after free occurred in main() in the case that a program being assembled was longer than the initially allocated intermediate array.
This commit is contained in:
Anachronaut
2026-04-27 16:58:43 -04:00
committed by GitHub
parent 49fd342135
commit b50210d127
4 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -195,5 +195,5 @@ void writeOutputFile(const char *outputFileName, uint8_t *Program, int programCo
fclose(outputFile);
printf("Successfully wrote SplitBit binary to \"%s\".\n", outputFileName);
printf(GREEN " Program Segment size: %d bytes.\n Data Segment size: %d bytes.\n Total size: %d bytes." RESET, programCount, dataCount, (programCount+dataCount+10));
printf(GREEN " Program Segment size: %d bytes.\n Data Segment size: %d bytes.\n Total size: %d bytes.\n" RESET, programCount, dataCount, (programCount+dataCount+10));
}