Commit 7bea0867 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bugs with reading pdf files.

parent 774f9c42
...@@ -1646,7 +1646,7 @@ namespace PdfReader ...@@ -1646,7 +1646,7 @@ namespace PdfReader
MemUtilsFree(punRefSegs); MemUtilsFree(punRefSegs);
if (m_pCurStream->GetPos() - unDataStartPos != unSegLength) if (unSegLength != 0xFFFFFFFF && m_pCurStream->GetPos() - unDataStartPos != unSegLength)
m_pCurStream->SetPos(unDataStartPos + unSegLength); m_pCurStream->SetPos(unDataStartPos + unSegLength);
} }
......
...@@ -803,7 +803,7 @@ namespace PdfReader ...@@ -803,7 +803,7 @@ namespace PdfReader
if (!bLimited || unStart + unLength > m_unStart + m_unLength) if (!bLimited || unStart + unLength > m_unStart + m_unLength)
{ {
unNewLength = m_unStart + m_unLength - unStart; unNewLength = m_unStart + m_unLength - unStart;
if (unStart >= m_unLength) if (unStart >= m_unStart + m_unLength)
unNewLength = 0; unNewLength = 0;
} }
else else
......
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