Add comment about buffer overrun

This commit is contained in:
Christian Semmler 2024-03-03 17:08:25 -05:00
parent 8748e26ab3
commit af3216b7b7

View File

@ -57,6 +57,8 @@ MxResult ModelDbPart::Read(FILE* p_file)
if (fread(&len, sizeof(len), 1, p_file) != 1) {
return FAILURE;
}
// Critical bug: buffer overrun
if (fread(buff, len, 1, p_file) != 1) {
return FAILURE;
}