Closed Bug 353902 Opened 18 years ago Closed 18 years ago

klocwork bugs in stanpcertdb.c

Categories

(NSS :: Libraries, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nelson, Assigned: alvolkov.bgs)

Details

(Keywords: klocwork)

Attachments

(1 file)

ID:       92611
Function: SEC_DeletePermCertificate
Location: nss/lib/certdb/stanpcertdb.c : 96

Pointer 'c' returned from call to function 'STAN_GetNSSCertificate' at 
line 93 may be NULL and will be dereferenced by passing argument 1 to 
function 'NSSCertificate_DeleteStoredObject' at line 96.

93	    NSSCertificate *c = STAN_GetNSSCertificate(cert); 
96	    nssrv = NSSCertificate_DeleteStoredObject(c, NULL); 

----

ID:       90018
Function: __CERT_AddTempCertToPerm
Location: nss/lib/certdb/stanpcertdb.c : 161

Pointer 'c' returned from call to function 'STAN_GetNSSCertificate' at 
line 157 may be NULL and will be dereferenced at line 161.

157	    NSSCertificate *c = STAN_GetNSSCertificate(cert); 
161	    context = c->object.cryptoContext;
Priority: -- → P2
Target Milestone: --- → 3.12
Assignee: nobody → alexei.volkov.bugs
Status: NEW → ASSIGNED
Attachment #242944 - Flags: review?(nelson)
Comment on attachment 242944 [details] [diff] [review]
check cert pointer for NULL

r=nelson
Attachment #242944 - Flags: review?(nelson) → review+
/cvsroot/mozilla/security/nss/lib/certdb/stanpcertdb.c,v  <--  stanpcertdb.c
new revision: 1.73; previous revision: 1.72
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: