Closed Bug 244929 Opened 20 years ago Closed 20 years ago

bad CRMF lib assertion hides errors in debug builds

Categories

(NSS :: Libraries, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nelson, Assigned: nelson)

References

Details

Attachments

(1 file)

A bad assertion in the CRMF library hides the very condition it was 
intended to detect.  This patch fixes that problem.
Whether the assertion should remain at all in TDB.  Wan-Teh?

RCS file: /cvsroot/mozilla/security/nss/lib/crmf/cmmfrec.c,v
retrieving revision 1.3
diff -u -r1.3 cmmfrec.c
--- lib/crmf/cmmfrec.c  25 Apr 2004 15:03:05 -0000      1.3
+++ lib/crmf/cmmfrec.c  28 May 2004 05:04:52 -0000
@@ -197,7 +197,7 @@
     }
     dummy = crmf_create_encrypted_value_wrapped_privkey(inPrivKey, inPubKey,
                                                        keyPair->privateKey);
-    PORT_Assert(dummy = keyPair->privateKey);
+    PORT_Assert(dummy == keyPair->privateKey);
     if (dummy != keyPair->privateKey) {
         crmf_destroy_encrypted_value(dummy, PR_TRUE);
        goto loser;
Priority: -- → P1
Target Milestone: --- → 3.10
Attached patch patch v1Splinter Review
Fix the above bug,  and clean up some other code.
Comment on attachment 149874 [details] [diff] [review]
patch v1

Julien, please review
Attachment #149874 - Flags: review?(julien.pierre.bugs)
Attachment #149874 - Flags: review?(julien.pierre.bugs) → review+
Attachment #149874 - Flags: superreview+
Thanks for the reviews.  

/cvsroot/mozilla/security/nss/lib/crmf/cmmfrec.c,v  <--  cmmfrec.c
new revision: 1.4; previous revision: 1.3

/cvsroot/mozilla/security/nss/lib/crmf/crmfcont.c,v  <--  crmfcont.c
new revision: 1.6; previous revision: 1.5

/cvsroot/mozilla/security/nss/lib/crmf/respcli.c,v  <--  respcli.c
new revision: 1.3; previous revision: 1.2
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: