From b3c690774150b6848ce6857fb02a384f5b110979 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 28 May 2017 01:17:16 +0000 Subject: [PATCH] bug 61059: fix NamePtg to read unsigned shorts instead of signed shorts, avoiding a AIOOBE when a workbook contains more than 32k Names. Thanks to Travis Burtrum for the patch. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1796466 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/ss/formula/ptg/NamePtg.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java b/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java index 6fa83feb9..1c590acaa 100644 --- a/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java +++ b/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java @@ -43,7 +43,7 @@ public final class NamePtg extends OperandPtg implements WorkbookDependentFormul /** Creates new NamePtg */ public NamePtg(LittleEndianInput in) { - field_1_label_index = in.readShort(); + field_1_label_index = in.readUShort(); field_2_zero = in.readShort(); }