mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-12 22:26:13 -04:00
UT NE A17
- nothing major, just reworks and preparations for the new rebuild code - added try / catch bad_alloc to prevent crashes during decompression of malformed Tiano/EFI11 compressed data
This commit is contained in:
parent
d1add47500
commit
a1253050fe
14 changed files with 395 additions and 547 deletions
|
@ -58,14 +58,8 @@ STATUS FitParser::parse(const QModelIndex & index, const QModelIndex & lastVtfIn
|
|||
if (!fitIndex.isValid())
|
||||
return ERR_SUCCESS;
|
||||
|
||||
// Get parsing data for the current item
|
||||
PARSING_DATA pdata = parsingDataFromQModelIndex(fitIndex);
|
||||
|
||||
// Explicitly set the item as fixed
|
||||
pdata.fixed = TRUE;
|
||||
|
||||
// Set modified parsing data
|
||||
model->setParsingData(fitIndex, parsingDataToQByteArray(pdata));
|
||||
model->setFixed(index, true);
|
||||
|
||||
// Special case of FIT header
|
||||
const FIT_ENTRY* fitHeader = (const FIT_ENTRY*)(model->body(fitIndex).constData() + fitOffset);
|
||||
|
@ -98,7 +92,7 @@ STATUS FitParser::parse(const QModelIndex & index, const QModelIndex & lastVtfIn
|
|||
fitTable.append(currentStrings);
|
||||
|
||||
// Process all other entries
|
||||
bool modifiedImageMayNotWork = false;
|
||||
bool msgModifiedImageMayNotWork = false;
|
||||
for (UINT32 i = 1; i < fitHeader->Size; i++) {
|
||||
currentStrings.clear();
|
||||
const FIT_ENTRY* currentEntry = fitHeader + i;
|
||||
|
@ -121,7 +115,7 @@ STATUS FitParser::parse(const QModelIndex & index, const QModelIndex & lastVtfIn
|
|||
case FIT_TYPE_AC_KEY_MANIFEST:
|
||||
case FIT_TYPE_AC_BOOT_POLICY:
|
||||
default:
|
||||
modifiedImageMayNotWork = true;
|
||||
msgModifiedImageMayNotWork = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -134,7 +128,7 @@ STATUS FitParser::parse(const QModelIndex & index, const QModelIndex & lastVtfIn
|
|||
fitTable.append(currentStrings);
|
||||
}
|
||||
|
||||
if (modifiedImageMayNotWork)
|
||||
if (msgModifiedImageMayNotWork)
|
||||
msg(tr("Opened image may not work after any modification"));
|
||||
|
||||
return ERR_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue