https://issues.apache.org/bugzilla/show_bug.cgi?id=47216
Summary: Possible NPE in Http11Processor.action()
Product: Tomcat 6
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
The code at around line 1075:
} else if (actionCode == ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE) {
if (localAddr == null)
localAddr = socket.getLocalAddress().getHostAddress();
fails to check if "socket != null".
Since this is checked everywhere else in the method this is probably a bug.
The method Http11Processor.parseHost() also references "socket" without
checking for null. Within the class, it is only called by process(Socket),
which guarantees that it won't be null.
However once process() returns normally, socket will be set to null.
The parseHost() method is public, so it may be called when socket == null.
Perhaps the parseHost() method should be private?
--
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]