C_Finalize status not checked in SECMOD_CancelWait

RESOLVED FIXED in 3.10

Status

NSS
Libraries
P2
normal
RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: Julien Pierre, Assigned: Julien Pierre)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

13 years ago
I found the following problem in pk11util.c by looking at compiler warnings
(gcc) . The bug is that crv is being assigned CKR_OK, instead of being tested.
There is no doubt about the fix, so I will check it in.

	crv = PK11_GETTAB(mod)->C_Finalize(NULL);
	/* ok, we slammed the module down, now we need to reinit it in case
	 * we intend to use it again */
	if (crv = CKR_OK) {
	    secmod_ModuleInit(mod);
	} else {
	    /* Finalized failed for some reason,  notify the application
	     * so maybe it has a prayer of recovering... */
	    PORT_SetError(PK11_MapError(crv));
	    rv = SECFailure;
	}
(Assignee)

Comment 1

13 years ago
Created attachment 179361 [details] [diff] [review]
fix as checked in

Checking in pk11util.c;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11util.c,v  <--  pk11util.c
new revision: 1.49; previous revision: 1.48
done
(Assignee)

Updated

13 years ago
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.10
(Assignee)

Updated

13 years ago
Summary: Error in SECMOD_CancelWait → C_Finalize status not checked in SECMOD_CancelWait

Comment 2

13 years ago
*** Bug 289047 has been marked as a duplicate of this bug. ***

Comment 3

12 years ago
*** Bug 355840 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.