Last Comment Bug 353374 - Klocwork 76494 - Null ptr derefs in CERT_FormatName
: Klocwork 76494 - Null ptr derefs in CERT_FormatName
Status: RESOLVED FIXED
: klocwork
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.11
: All All
: P2 normal (vote)
: 3.12
Assigned To: Alexei Volkov
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-19 13:10 PDT by Nelson Bolyard (seldom reads bugmail)
Modified: 2006-10-04 11:27 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
check a pointer for NULL before deref it. (6.76 KB, patch)
2006-09-27 17:24 PDT, Alexei Volkov
nelson: review+
Details | Diff | Splinter Review

Description Nelson Bolyard (seldom reads bugmail) 2006-09-19 13:10:21 PDT
In file nss/lib/certhigh/certhtml.c, in function CERT_FormatName, 
there are 8 calls to CERT_DecodeAVAValue, each of which returns a pointer.
Immediately following each call, that pointer is derefenced without first
being checked for NULL.  The function can and does occasionally return NULL.

Klockwork IDs 76494, 76496, 76498, 46500, 76502, 76504, 76506, 76508.
Comment 1 Alexei Volkov 2006-09-27 17:24:19 PDT
Created attachment 240386 [details] [diff] [review]
check a pointer for NULL before deref it.
Comment 2 Nelson Bolyard (seldom reads bugmail) 2006-09-27 21:02:45 PDT
Comment on attachment 240386 [details] [diff] [review]
check a pointer for NULL before deref it.

r=nelson for trunk
Comment 3 Alexei Volkov 2006-09-29 13:19:21 PDT
/cvsroot/mozilla/security/nss/lib/certdb/secname.c,v  <--  secname.c
new revision: 1.20; previous revision: 1.19
/cvsroot/mozilla/security/nss/lib/certhigh/certhtml.c,v  <--  certhtml.c
new revision: 1.7; previous revision: 1.6

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