Closed Bug 43337 Opened 25 years ago Closed 25 years ago

PR_GetPeerName() asserts

Categories

(NSPR :: NSPR, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: larryh, Assigned: larryh)

Details

The WinNT implementation of _PR_MD_GETPEERNAME() uses PRNetAddr structure before initializing it.
Function SocketGetPeerName() asserts at line 992. Prior call to _PR_MD_GETPEERNAME() used the PRNetAddr structure before initializing it.
Status: NEW → ASSIGNED
check in fix to NSPRPUB_CLIENT_BRANCH Checking in ntio.c; /cvsroot/mozilla/nsprpub/pr/src/md/windows/ntio.c,v <-- ntio.c new revision: 3.21.2.3; previous revision: 3.21.2.2 done check in fix to the tip of the NSPR tree. Checking in ntio.c; /cvsroot/mozilla/nsprpub/pr/src/md/windows/ntio.c,v <-- ntio.c new revision: 3.29; previous revision: 3.28 done check in fix to NSPRPUB_RELEASE_4_0_BRANCH Checking in ntio.c; /cvsroot/mozilla/nsprpub/pr/src/md/windows/ntio.c,v <-- ntio.c new revision: 3.20.4.10; previous revision: 3.20.4.9 done I created a v4.0.1beta release, binary parts, for Windows NT only. iPlanet internal folks wishing to pick up binary parts are encouraged to see: /h/tortoise/export/share/builds/components/nspr20/v4.0.1beta See the README file in the directory.
Larry, could you do a search in the source tree for PR_NETADDR_SIZE and make sure that we always initialize 'addr' before passing it to PR_NETADDR_SIZE? Thanks.
Searched the NSPR source tree (tip) for PR_NETADDR_SIZE. Examined usage. There appears to be no other usage where the PRNetAddr sturcture was uninitialized.
Target Milestone: --- → 4.0.1
The fix, as originally designed, fixed the problem. It was a bit kludgy though. Wan-Teh suggested a better fix. Committed same.
marking it fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.