Last Comment Bug 354008 - klocwork bugs in freebl
: klocwork bugs in freebl
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-23 20:14 PDT by Nelson Bolyard (seldom reads bugmail)
Modified: 2006-09-29 13:14 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
check args before deref pointers (1.04 KB, patch)
2006-09-26 16:19 PDT, Alexei Volkov
nelson: review+
Details | Diff | Splinter Review

Description Nelson Bolyard (seldom reads bugmail) 2006-09-23 20:14:32 PDT
ID:       91218
Function: mp_div
Location: nss/lib/freebl/mpi/mpi.c : 1006

Dereference of pointer 'a' at line 1006 before NULL check at line 1009

1006	  mp_sign  signA = MP_SIGN(a); 
1007	  mp_sign  signB = MP_SIGN(b); 
1008	 
1009	  ARGCHK(a != NULL && b != NULL, MP_BADARG); 

----

ID 91219

Same issue as above, but for pointer variable b at line 1007, 1009
Comment 1 Alexei Volkov 2006-09-26 16:19:25 PDT
Created attachment 240226 [details] [diff] [review]
check args before deref pointers
Comment 2 Nelson Bolyard (seldom reads bugmail) 2006-09-26 18:17:45 PDT
Comment on attachment 240226 [details] [diff] [review]
check args before deref pointers

r=nelson for trunk
Comment 3 Alexei Volkov 2006-09-29 13:12:34 PDT
/cvsroot/mozilla/security/nss/lib/freebl/mpi/mpi.c,v  <--  mpi.c
new revision: 1.45; previous revision: 1.44

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