Commit 20b781cb authored by Oleg Korshul's avatar Oleg Korshul

pdf checker bug

parent e7bbbec0
...@@ -118,6 +118,9 @@ bool COfficeFileFormatChecker::isPdfFormatFile (unsigned char* pBuffer,int dwByt ...@@ -118,6 +118,9 @@ bool COfficeFileFormatChecker::isPdfFormatFile (unsigned char* pBuffer,int dwByt
if (pBuffer == NULL) return false; if (pBuffer == NULL) return false;
int nTempBufferSize = dwBytes < 20 ? dwBytes : 20; int nTempBufferSize = dwBytes < 20 ? dwBytes : 20;
if (nTempBufferSize < 1)
return false;
char* pTempBuffer = new char[nTempBufferSize]; char* pTempBuffer = new char[nTempBufferSize];
memcpy ( pTempBuffer, pBuffer, nTempBufferSize ); memcpy ( pTempBuffer, pBuffer, nTempBufferSize );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment