[Bug 63151] New: NPE in UnicodeString.swapFontUse on invoking HSSFOptimiser.optimiseFonts

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 63151] New: NPE in UnicodeString.swapFontUse on invoking HSSFOptimiser.optimiseFonts

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63151

            Bug ID: 63151
           Summary: NPE in UnicodeString.swapFontUse on invoking
                    HSSFOptimiser.optimiseFonts
           Product: POI
           Version: 4.0.0-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 36428
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36428&action=edit
A test case to reproduce the issue

Please find a reproducer in attachment.
This is with Java 11 and POI 4.0.1.

The stack trace is:
Exception in thread "main" java.lang.NullPointerException
        at
org.apache.poi.hssf.record.common.UnicodeString.swapFontUse(UnicodeString.java:676)
        at
org.apache.poi.hssf.usermodel.HSSFOptimiser.optimiseFonts(HSSFOptimiser.java:155)
        at ...


The problem is fairly obvious: the line loops over the elements of
field_4_format_runs without doing a null-check on it first.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63151] NPE in UnicodeString.swapFontUse on invoking HSSFOptimiser.optimiseFonts

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63151

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63151] NPE in UnicodeString.swapFontUse on invoking HSSFOptimiser.optimiseFonts

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63151

PJ Fanning <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from PJ Fanning <[hidden email]> ---
fix applied in https://svn.apache.org/viewvc?view=revision&revision=1853859

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]