Subject: kern/27082: redundant assignment or NULL dereference in in_pcbconnect()
To: None <gnats-bugs@gnats.netbsd.org>
From: None <seanb@qnx.com>
List: netbsd-bugs
Date: 09/29/2004 17:02:28
>Number: 27082
>Category: kern
>Synopsis: redundant assignment or NULL dereference in in_pcbconnect()
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 29 20:30:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Sean Boudreau
>Release: NetBSD 2.0
>Organization:
QNX
>Environment:
System: NetBSD 1.6 NetBSD 1.6 (seanb) #6: Wed Nov 12 15:38:53 EST 2003 seanb@:/usr/src/sys/arch/i386/compile/seanb i386
Architecture: i386
Machine: i386
>Description:
redundant assignment or NULL dereference in in_pcbconnect()
>How-To-Repeat:
>Fix:
Plus there's a window where ia is NULL here.
-seanb
Index: netinet/in_pcb.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/in_pcb.c,v
retrieving revision 1.95
diff -c -r1.95 in_pcb.c
*** netinet/in_pcb.c 25 Apr 2004 16:42:42 -0000 1.95
--- netinet/in_pcb.c 29 Sep 2004 14:47:16 -0000
***************
*** 447,453 ****
if (error == EAGAIN)
return (error);
}
- inp->inp_laddr = ia->ia_addr.sin_addr;
inp->inp_laddr = ifaddr->sin_addr;
}
inp->inp_faddr = sin->sin_addr;
--- 447,452 ----
>Release-Note:
>Audit-Trail:
>Unformatted: