Return-Path: X-Original-To: apmail-pdfbox-commits-archive@www.apache.org Delivered-To: apmail-pdfbox-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 97893116B5 for ; Tue, 23 Sep 2014 16:25:21 +0000 (UTC) Received: (qmail 11546 invoked by uid 500); 23 Sep 2014 16:25:21 -0000 Delivered-To: apmail-pdfbox-commits-archive@pdfbox.apache.org Received: (qmail 11522 invoked by uid 500); 23 Sep 2014 16:25:21 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 11513 invoked by uid 99); 23 Sep 2014 16:25:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 16:25:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 16:24:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0433423888FE; Tue, 23 Sep 2014 16:24:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1627082 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java Date: Tue, 23 Sep 2014 16:24:57 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140923162458.0433423888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); }