Merge from dev-unity

This commit is contained in:
iaom 2021-07-20 10:41:51 +08:00
commit 9a3e775c2d
1 changed files with 7 additions and 2 deletions

View File

@ -5205,8 +5205,10 @@ int KBinaryParser::InitDocOle(FILE* pFile, long lFilesize, QString &content) {
for(iIndex = 0, ulTmp = ulSbdStartblock;
iIndex < (int)tBBDLen && ulTmp != END_OF_CHAIN;
iIndex++, ulTmp = aulBBD[ulTmp]) {
if(ulTmp >= (ULONG)tBBDLen)
if(ulTmp >= (ULONG)tBBDLen) {
qWarning("The Big Block Depot is damaged");
return -1;
}
aulSbdList[iIndex] = ulTmp;
}
@ -5349,7 +5351,10 @@ bool KBinaryParser::RunParser(QString strFile, QString &content) {
(void)fclose(pFile);
return false;
}
InitDocOle(pFile, lFileSize, content);
// If InitDocOle failed, -1 will be returned.
if(InitDocOle(pFile, lFileSize, content)) {
qWarning() << "InitDocOle failed!" << strFile;
}
fclose(pFile);
return true;
}