ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40334] New: - Possible NPE in TarInputStream
Date Mon, 28 Aug 2006 11:21:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40334>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40334

           Summary: Possible NPE in TarInputStream
           Product: Ant
           Version: 1.7.0Beta1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: urazov@parasoft.com.pl


I'm running Jtest's BugDetective feature on Ant-1.7.0Beta1 and it reports a
possible NullPointerException in TarInputStream.

The problem is said to happen in getNextEntry() method at line 266 when
setName() is called on `currEntry' field.

BugDetective reports that despite at line 251 there is check for the field to be
non-null:

        if (this.currEntry != null && this.currEntry.isGNULongNameEntry()) {

The field can still have null value at line 266 because at line 259
getNextEntry() is called recursively and can assign null to the field if it hits
EOF.

I'm attaching a screenshot from BugDetective which describes the exact flow
which may lead to the exception.

Please let me know if this is a real problem or BugDetective is mistaken.

Thank you!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message