Q3DLoader: Fix possible material string overflow (#5556)
- closes https://github.com/assimp/assimp/issues/5555pull/5542/head^2
parent
7bda0f88ca
commit
c05895f3c7
|
@ -250,6 +250,10 @@ void Q3DImporter::InternReadFile(const std::string &pFile,
|
||||||
c = stream.GetI1();
|
c = stream.GetI1();
|
||||||
while (c) {
|
while (c) {
|
||||||
mat.name.data[mat.name.length++] = c;
|
mat.name.data[mat.name.length++] = c;
|
||||||
|
if (mat.name.length == MAXLEN) {
|
||||||
|
ASSIMP_LOG_ERROR("String ouverflow detected, skipped material name parsing.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
c = stream.GetI1();
|
c = stream.GetI1();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue