Fix out-of-bounds write on malformed input
parent
a9a62368f8
commit
128923a262
|
@ -954,6 +954,9 @@ inline void LWOImporter::DoRecursiveVMAPAssignment(VMapEntry* base, unsigned int
|
|||
LWO::ReferrerList& refList = mCurLayer->mPointReferrers;
|
||||
unsigned int i;
|
||||
|
||||
if (idx >= base->abAssigned.size()) {
|
||||
throw DeadlyImportError("Bad index");
|
||||
}
|
||||
base->abAssigned[idx] = true;
|
||||
for (i = 0; i < numRead;++i) {
|
||||
base->rawData[idx*base->dims+i]= data[i];
|
||||
|
|
Loading…
Reference in New Issue