Last Comment Bug 353902 - klocwork bugs in stanpcertdb.c
: klocwork bugs in stanpcertdb.c
Status: RESOLVED FIXED
: klocwork
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: trunk
: All All
: P2 normal (vote)
: 3.12
Assigned To: Alexei Volkov
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-22 17:25 PDT by Nelson Bolyard (seldom reads bugmail)
Modified: 2006-10-30 16:24 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
check cert pointer for NULL (1.76 KB, patch)
2006-10-20 18:13 PDT, Alexei Volkov
nelson: review+
Details | Diff | Splinter Review

Description Nelson Bolyard (seldom reads bugmail) 2006-09-22 17:25:18 PDT
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;
Comment 1 Alexei Volkov 2006-10-20 18:13:46 PDT
Created attachment 242944 [details] [diff] [review]
check cert pointer for NULL
Comment 2 Nelson Bolyard (seldom reads bugmail) 2006-10-20 21:30:36 PDT
Comment on attachment 242944 [details] [diff] [review]
check cert pointer for NULL

r=nelson
Comment 3 Alexei Volkov 2006-10-30 16:24:58 PST
/cvsroot/mozilla/security/nss/lib/certdb/stanpcertdb.c,v  <--  stanpcertdb.c
new revision: 1.73; previous revision: 1.72

Note You need to log in before you can comment on or make changes to this bug.