diff options
Diffstat (limited to 'xmlsecurity/source/pdfio/pdfdocument.cxx')
-rw-r--r-- | xmlsecurity/source/pdfio/pdfdocument.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx index 0457f0dd3e34..209b6df3dbe2 100644 --- a/xmlsecurity/source/pdfio/pdfdocument.cxx +++ b/xmlsecurity/source/pdfio/pdfdocument.cxx @@ -1311,12 +1311,14 @@ OString PDFDocument::ReadKeyword(SvStream& rStream) OStringBuffer aBuf; char ch; rStream.ReadChar(ch); + if (rStream.IsEof()) + return OString(); while (isalpha(ch)) { aBuf.append(ch); rStream.ReadChar(ch); if (rStream.IsEof()) - break; + return aBuf.toString(); } rStream.SeekRel(-1); return aBuf.toString(); |