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 40144200CBE for ; Thu, 22 Jun 2017 19:30:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3E506160BD3; Thu, 22 Jun 2017 17:30:34 +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 784D4160BE7 for ; Thu, 22 Jun 2017 19:30:33 +0200 (CEST) Received: (qmail 50166 invoked by uid 500); 22 Jun 2017 17:30:32 -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 50103 invoked by uid 99); 22 Jun 2017 17:30:31 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2017 17:30:31 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 3312A3A0351 for ; Thu, 22 Jun 2017 17:30:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1799597 - /pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java Date: Thu, 22 Jun 2017 17:30:31 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170622173031.3312A3A0351@svn01-us-west.apache.org> archived-at: Thu, 22 Jun 2017 17:30:34 -0000 Author: tilman Date: Thu Jun 22 17:30:30 2017 New Revision: 1799597 URL: http://svn.apache.org/viewvc?rev=1799597&view=rev Log: PDFBOX-3839: avoid AIOOB Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java?rev=1799597&r1=1799596&r2=1799597&view=diff ============================================================================== --- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java (original) +++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java Thu Jun 22 17:30:30 2017 @@ -315,7 +315,7 @@ public class PostScriptTable extends TTF */ public String getName(int gid) { - if (gid < 0 || glyphNames == null || gid > glyphNames.length) + if (gid < 0 || glyphNames == null || gid >= glyphNames.length) { return null; }