mirror of https://github.com/apache/poi.git
Buf fix plus testcasde: Reading property values failed with a StringIndexOutOfBoundsException on empty strings.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353485 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a24f1136d0
commit
11850930ed
|
@ -265,7 +265,7 @@ public class Property
|
|||
b.append((char) src[o + j]);
|
||||
|
||||
/* Strip 0x00 characters from the end of the string: */
|
||||
while (b.charAt(b.length() - 1) == 0x00)
|
||||
while (b.length() > 0 && b.charAt(b.length() - 1) == 0x00)
|
||||
b.setLength(b.length() - 1);
|
||||
if (codepage == CP_UNICODE)
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue