Last Comment Bug 353742 - klocwork null ptr dereference in ocsp_DecodeResponseBytes
: klocwork null ptr dereference in ocsp_DecodeResponseBytes
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-21 21:30 PDT by Nelson Bolyard (seldom reads bugmail)
Modified: 2006-10-09 15:20 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
return null if rbytes is null (1.07 KB, patch)
2006-10-02 14:58 PDT, Alexei Volkov
nelson: review+
Details | Diff | Splinter Review

Description Nelson Bolyard (seldom reads bugmail) 2006-09-21 21:30:56 PDT
Klockwork ID 87806
File      nss/lib/certhigh/ocsp.c
Function  ocsp_DecodeResponseBytes

Pointer 'rbytes' checked for NULL at line 1450 will be dereferenced at line 1453.

1449   PORT_Assert(rbytes != NULL);		/* internal error, really */ 
1450   if (rbytes == NULL) 
1451       PORT_SetError(SEC_ERROR_INVALID_ARGS); /* XXX set better error? */ 
1452	 
1453   rbytes->responseTypeTag = SECOID_FindOIDTag(&rbytes->responseType); 

Obviously, calling PORT_SetError at line 1451 doesn't solve the problem.
Comment 1 Alexei Volkov 2006-10-02 14:58:33 PDT
Created attachment 240986 [details] [diff] [review]
return null if rbytes is null
Comment 2 Nelson Bolyard (seldom reads bugmail) 2006-10-02 15:12:14 PDT
Comment on attachment 240986 [details] [diff] [review]
return null if rbytes is null

r=nelson
Comment 3 Alexei Volkov 2006-10-09 15:20:18 PDT
/cvsroot/mozilla/security/nss/lib/certhigh/ocsp.c,v  <--  ocsp.c
new revision: 1.29; previous revision: 1.28

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