Fix buffer overrun
This commit is contained in:
parent
bf315f266f
commit
d275cbdd07
|
@ -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 New Issue