https://issues.apache.org/bugzilla/show_bug.cgi?id=52665

             Bug #: 52665
           Summary: An incomplete fix for the NPE bug in
                    ZipFileZipEntrySource.java
           Product: POI
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: POI Overall
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


The fix revision 1179452 was aimed to remove an NPE bug on the  "zipArchive" in
the method "close" of the file
"/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java"
, but it is incomplete. 
Since the "zipArchive" could be null during the run-time execution, its 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 44 of the method "getEntries()" : 
    public Enumeration<? extends ZipEntry> getEntries() {
[Line 44]      return zipArchive.entries();
   }

Line  48 of the method "getInputStream()" :
  public InputStream getInputStream(ZipEntry entry) throws IOException {
[Line 48]      return zipArchive.getInputStream(entry);
   }

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to