This bug is reported by Doug Turner (firstname.lastname@example.org) in netscape.public.mozilla.nspr: Currently they are dumbly swapping. could these check to see if the bytes to need to be rearranged and if they do not, just no-op?
I added a new test nsprpub/pr/tests/ntoh.c for PR_ntohs, PR_ntohl, PR_ntohll, PR_htons, PR_htonl, and PR_htonll on the NSPRPUB_RELEASE_4_0_BRANCH.
Turns out that PR_htonll and PR_ntohll not only dumbly swap bytes but also swap bytes incorrectly. The 'lo' and 'hi' halves should also be swapped.
I checked in the fix on NSPRPUB_RELEASE_4_0_BRANCH. /cvsroot/mozilla/nsprpub/pr/src/misc/prnetdb.c, revision 22.214.171.124
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.