[Libreoffice-commits] core.git: vcl/source
Stephan Bergmann
sbergman at redhat.com
Wed Mar 22 09:06:12 UTC 2017
vcl/source/filter/ipdf/pdfdocument.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit e8aaaa52fa5abe4a70224ab6e6eee6265b0d61c8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Mar 22 10:03:40 2017 +0100
Missing check for rStream.IsEof()
...after a324099538916eae7f7239d32fd98ec8018cbb72 "xmlsecurity PDF signing: only
write incremental xref in an incremental update" inserted the 'if' before the
'while (!rStream.IsEof())'
Change-Id: Ib527894031f356c3d6df40b70259469ef4c338de
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx
index 0e458e053a24..fe60765ed5eb 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -1917,6 +1917,10 @@ bool PDFNumberElement::Read(SvStream& rStream)
m_nOffset = rStream.Tell();
char ch;
rStream.ReadChar(ch);
+ if (rStream.IsEof())
+ {
+ return false;
+ }
if (!isdigit(ch) && ch != '-' && ch != '.')
{
rStream.SeekRel(-1);
More information about the Libreoffice-commits
mailing list