mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-28 23:13:02 +00:00
Fix buffer overrun
This commit is contained in:
parent
bf315f266f
commit
d275cbdd07
1 changed files with 6 additions and 0 deletions
|
@ -104,6 +104,9 @@ char *DynOS_Read_Buffer(FILE* aFile, GfxData* aGfxData) {
|
|||
}
|
||||
}
|
||||
|
||||
// Make sure it's NULL terminated
|
||||
_FileBuffer[_Length] = '\0';
|
||||
|
||||
return _FileBuffer;
|
||||
}
|
||||
|
||||
|
@ -142,6 +145,9 @@ void DynOS_Read_Source(GfxData *aGfxData, const SysPath &aFilename) {
|
|||
while (*c != '\n' && *c != '\0') {
|
||||
c++;
|
||||
}
|
||||
if (*c == '\0') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Reading data type name
|
||||
|
|
Loading…
Reference in a new issue