mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
fix bug #67066
This commit is contained in:
@ -236,6 +236,15 @@ bool COfficeFileFormatChecker::isPdfFormatFile(unsigned char *pBuffer, int dwByt
|
||||
|
||||
char *pFirst = strstr((char *)pBuffer, "%PDF-");
|
||||
|
||||
if (NULL == pFirst)
|
||||
{
|
||||
//skip special
|
||||
_UINT16 sz = pBuffer[0] + (pBuffer[1] << 8);
|
||||
if (sz < dwBytes - 8)
|
||||
{
|
||||
pFirst = strstr((char*)(pBuffer + sz), "%PDF-");
|
||||
}
|
||||
}
|
||||
if (NULL != pFirst)
|
||||
{
|
||||
pFirst = strstr((char *)pBuffer, "%DocumentID ");
|
||||
|
||||
Reference in New Issue
Block a user