Fix bug 75687

This commit is contained in:
Svetlana Kulikova
2025-07-04 14:27:16 +03:00
parent 103c8dd575
commit 4770a2b22b

View File

@ -240,7 +240,7 @@ bool COfficeFileFormatChecker::isPdfFormatFile(unsigned char *pBuffer, int dwByt
documentID.clear();
if (dwBytes < 1)
if (dwBytes < 5 || (pBuffer[0] == 'P' && pBuffer[1] == 'K'))
return false;
pBuffer[dwBytes - 1] = '\0';