Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 59EFD200C05 for ; Mon, 23 Jan 2017 09:32:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 58853160B49; Mon, 23 Jan 2017 08:32:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A2F9D160B3E for ; Mon, 23 Jan 2017 09:32:51 +0100 (CET) Received: (qmail 1705 invoked by uid 500); 23 Jan 2017 08:32:50 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 1694 invoked by uid 99); 23 Jan 2017 08:32:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2017 08:32:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 398831A042E for ; Mon, 23 Jan 2017 08:32:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UMf78fKxHjYI for ; Mon, 23 Jan 2017 08:32:49 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id BD6AA5F30D for ; Mon, 23 Jan 2017 08:32:48 +0000 (UTC) Received: from asf-bz1-us-mid.priv.apache.org (nat1-us-mid.apache.org [23.253.172.122]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTPS id E4CADE012C for ; Mon, 23 Jan 2017 08:32:47 +0000 (UTC) Received: by asf-bz1-us-mid.priv.apache.org (ASF Mail Server at asf-bz1-us-mid.priv.apache.org, from userid 33) id D909B60C11; Mon, 23 Jan 2017 08:32:46 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 60626] New: ArrayIndexOutOfBoundsException in EvilUnclosedBRFixingInputStream Date: Mon, 23 Jan 2017 08:32:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: XSSF X-Bugzilla-Version: 3.16-dev X-Bugzilla-Keywords: X-Bugzilla-Severity: blocker X-Bugzilla-Who: pik@uniquare.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bz.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 archived-at: Mon, 23 Jan 2017 08:32:52 -0000 https://bz.apache.org/bugzilla/show_bug.cgi?id=3D60626 Bug ID: 60626 Summary: ArrayIndexOutOfBoundsException in EvilUnclosedBRFixingInputStream Product: POI Version: 3.16-dev Hardware: PC Status: NEW Severity: blocker Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: pik@uniquare.com Target Milestone: --- Created attachment 34663 --> https://bz.apache.org/bugzilla/attachment.cgi?id=3D34663&action=3Dedit VML file that causes the problem I have an Excel file that can't be loaded. I found that EvilUnclosedBRFixingInputStream has a problem with a VML file with was part= of my Excel file.=20 The following sample code reproduces the problem: String xmlFile =3D "vmlDrawing3.vml"; byte[] data =3D Files.readAllBytes(Paths.get(xmlFile)); ByteArrayInputStream bis =3D new ByteArrayInputStream(data); EvilUnclosedBRFixingInputStream is =3D new EvilUnclosedBRFixingInputStream(= bis); DocumentHelper.readDocument(is); The following Exception is thrown, however not in all Operating Systems/JDK Versions: Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:336) at org.apache.xerces.impl.XMLEntityScanner.load(XMLEntityScanner.java:1753) at org.apache.xerces.impl.XMLEntityScanner.scanLiteral(XMLEntityScanner.java:8= 34) at org.apache.xerces.impl.XMLScanner.scanAttributeValue(XMLScanner.java:772) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocument= ScannerImpl.java:529) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocum= entScannerImpl.java:181) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispat= cher.dispatch(XMLDocumentFragmentScannerImpl.java:1653) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocum= entFragmentScannerImpl.java:324) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:= 875) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:= 798) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:2= 98) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) at org.apache.poi.util.DocumentHelper.readDocument(DocumentHelper.java:137) ... --=20 You are receiving this mail because: You are the assignee for the bug.= --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org