Closed
Bug 466736
Opened 17 years ago
Closed 17 years ago
Incorrect use of NSS_USE_64 in lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.12.3
People
(Reporter: wtc, Assigned: alvolkov.bgs)
Details
Attachments
(1 file)
|
1.19 KB,
patch
|
alvolkov.bgs
:
review+
|
Details | Diff | Splinter Review |
As this MXR query shows:
http://mxr.mozilla.org/security/search?string=NSS_USE_64
the NSS_USE_64 macro is only defined by lib/freebl/Makefile.
So the #ifdef NSS_USE_64 tests in
lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c are guaranteed
to be false.
They should be either replaced by #ifdef IS_64 tests, or
removed (the code inside those #ifdef NSS_USE_64 tests is
dead code). The relevant code is reproduced below:
398 static PKIX_Error *
399 pkix_pl_Object_Hashcode_Default(
400 PKIX_PL_Object *object,
401 PKIX_UInt32 *pValue,
402 void *plContext)
403 {
404 #ifdef NSS_USE_64
405 union {
406 void *pointer;
407 PKIX_UInt32 hilo[2];
408 } extracter;
409 #endif
410
411 PKIX_ENTER(OBJECT, "pkix_pl_Object_Hashcode_Default");
412 PKIX_NULLCHECK_TWO(object, pValue);
413
414 #ifdef NSS_USE_64
415 extracter.pointer = object;
416 *pValue = extracter.hilo[1];
417 #else
418 *pValue = (PKIX_UInt32)object;
419 #endif
420
421 PKIX_RETURN(OBJECT);
422 }
Attachment #350072 -
Flags: review?(alexei.volkov.bugs)
| Assignee | ||
Comment 1•17 years ago
|
||
Comment on attachment 350072 [details] [diff] [review]
Remove the #ifdef NSS_USE_64 code
r+.
Attachment #350072 -
Flags: review?(alexei.volkov.bugs) → review+
| Reporter | ||
Comment 2•17 years ago
|
||
I checked in the patch on the NSS trunk (NSS 3.12.3).
Checking in pkix_pl_object.c;
/cvsroot/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c,v
<-- pkix_pl_object.c
new revision: 1.11; previous revision: 1.10
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12.3
You need to log in
before you can comment on or make changes to this bug.
Description
•