Commit c69a6f32 authored by Oleg Korshul's avatar Oleg Korshul Committed by Alexander Trofimov

баги с падениями при открытии пдф

parent 9544f6ed
...@@ -655,6 +655,9 @@ INT CFontManager::LoadFontFromFile(const std::wstring& sPath, const int& lFaceIn ...@@ -655,6 +655,9 @@ INT CFontManager::LoadFontFromFile(const std::wstring& sPath, const int& lFaceIn
CFontsCache* pCache = (m_pOwnerCache != NULL) ? m_pOwnerCache : m_pApplication->GetCache(); CFontsCache* pCache = (m_pOwnerCache != NULL) ? m_pOwnerCache : m_pApplication->GetCache();
m_pFont = pCache->LockFont(m_pLibrary, sPath, lFaceIndex, dSize); m_pFont = pCache->LockFont(m_pLibrary, sPath, lFaceIndex, dSize);
if (NULL == m_pFont)
return FALSE;
m_pFont->m_pFontManager = this; m_pFont->m_pFontManager = this;
m_pFont->SetSizeAndDpi(dSize, (UINT)dDpiX, (UINT)dDpiY); m_pFont->SetSizeAndDpi(dSize, (UINT)dDpiX, (UINT)dDpiY);
......
...@@ -284,7 +284,7 @@ namespace PdfReader ...@@ -284,7 +284,7 @@ namespace PdfReader
} }
AESDecryptBlock(&m_oState.oAES, sIn, m_pStream->LookChar() == EOF); AESDecryptBlock(&m_oState.oAES, sIn, m_pStream->LookChar() == EOF);
} }
if (m_oState.oAES.nBufferIndex == 16) if (m_oState.oAES.nBufferIndex >= 16)
{ {
nChar = EOF; nChar = EOF;
} }
...@@ -815,4 +815,4 @@ namespace PdfReader ...@@ -815,4 +815,4 @@ namespace PdfReader
sDigest[14] = (unsigned char)((d >>= 8) & 0xff); sDigest[14] = (unsigned char)((d >>= 8) & 0xff);
sDigest[15] = (unsigned char)((d >>= 8) & 0xff); sDigest[15] = (unsigned char)((d >>= 8) & 0xff);
} }
} }
\ No newline at end of file
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