Closed
Bug 27834
Opened 25 years ago
Closed 25 years ago
PR_ntohll and PR_htonll dumbly swap bytes.
Categories
(NSPR :: NSPR, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file)
1.58 KB,
patch
|
Details | Diff | Splinter Review |
This bug is reported by Doug Turner (dougt@netscape.com) 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?
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•25 years ago
|
||
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.
Assignee | ||
Comment 2•25 years ago
|
||
Assignee | ||
Comment 3•25 years ago
|
||
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.
Assignee | ||
Comment 4•25 years ago
|
||
I checked in the fix on NSPRPUB_RELEASE_4_0_BRANCH. /cvsroot/mozilla/nsprpub/pr/src/misc/prnetdb.c, revision 3.11.4.16
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.
Description
•