You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2014/09/23 18:24:57 UTC
svn commit: r1627082 -
/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
Author: tilman
Date: Tue Sep 23 16:24:57 2014
New Revision: 1627082
URL: http://svn.apache.org/r1627082
Log:
PDFBOX-2376: disable heuristics for ID...EI near end of stream
Modified:
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java?rev=1627082&r1=1627081&r2=1627082&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java Tue Sep 23 16:24:57 2014
@@ -484,10 +484,13 @@ public class PDFStreamParser extends Bas
}
}
}
- // a PDF operator is 1-3 bytes long
- if (endOpIdx == -1 || startOpIdx == -1 || endOpIdx - startOpIdx > 3)
+ if (readBytes == maxBinCharTestLength) // only if not close to eof
{
- noBinData = false;
+ // a PDF operator is 1-3 bytes long
+ if (endOpIdx == -1 || startOpIdx == -1 || endOpIdx - startOpIdx > 3)
+ {
+ noBinData = false;
+ }
}
pdfSource.unread(binCharTestArr, 0, readBytes);
}