Fix buffer overrun

This commit is contained in:
MysterD 2022-04-13 21:24:38 -07:00
parent bf315f266f
commit d275cbdd07

View file

@ -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