mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-06-06 09:41:16 -04:00
Make sure to wrap all uses of kaitai::kstream into try-catch blocks
This commit is contained in:
parent
7ef371957a
commit
d61d759db2
1 changed files with 102 additions and 97 deletions
|
@ -953,6 +953,7 @@ USTATUS FfsParser::parseRawArea(const UModelIndex & index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (itemType == Types::InsydeFlashDeviceMapStore) {
|
else if (itemType == Types::InsydeFlashDeviceMapStore) {
|
||||||
|
try {
|
||||||
UByteArray fdm = data.mid(itemOffset, itemSize);
|
UByteArray fdm = data.mid(itemOffset, itemSize);
|
||||||
umemstream is(fdm.constData(), fdm.size());
|
umemstream is(fdm.constData(), fdm.size());
|
||||||
kaitai::kstream ks(&is);
|
kaitai::kstream ks(&is);
|
||||||
|
@ -1060,6 +1061,10 @@ USTATUS FfsParser::parseRawArea(const UModelIndex & index)
|
||||||
securityInfo += "\n";
|
securityInfo += "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (...) {
|
||||||
|
// Parsing failed
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return U_UNKNOWN_ITEM_TYPE;
|
return U_UNKNOWN_ITEM_TYPE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue