You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/02/14 10:53:17 UTC
DO NOT REPLY [Bug 52662] New: An incomplete fix for the NPE bug in
CharacterRun.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=52662
Bug #: 52662
Summary: An incomplete fix for the NPE bug in CharacterRun.java
Product: POI
Version: unspecified
Platform: PC
Status: NEW
Severity: critical
Priority: P2
Component: HWPF
AssignedTo: dev@poi.apache.org
ReportedBy: lianggt08@sei.pku.edu.cn
Classification: Unclassified
The fix revision 1142762 was aimed to remove an NPE bug on the returned value
of "_doc.getFontTable() " in the method "toString" of the file
"/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java"
, but it is incomplete.
Since the "_doc.getFontTable()" could be null during the run-time execution,
its returned value should also be null-checked before being dereferenced in
other methods.
The buggy code locations the same fix needs to be applied at are as bellows:
Line 609 of the method "getSymbolFont".
public Ffn getSymbolFont()
{
if (isSymbol()) {
[Line 609] Ffn[] fontNames = _doc.getFontTable().getFontNames();
if (fontNames.length <= _props.getFtcSym())
return null;
return fontNames[_props.getFtcSym()];
} else
throw new IllegalStateException("Not a symbol CharacterRun");
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 52662] An incomplete fix for the NPE bug in
CharacterRun.java
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52662
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
OS/Version| |All
--- Comment #1 from Nick Burch <ni...@alfresco.com> 2012-02-14 12:56:40 UTC ---
Thanks, applied in r1243907.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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