Last Comment Bug 334234 - PK11_NewSlotInfo returns freed objects if lock allocations fail
: PK11_NewSlotInfo returns freed objects if lock allocations fail
Status: RESOLVED FIXED
CID 289
: coverity, fixed1.8.0.10, fixed1.8.1.1
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.11
: All All
: P2 critical (vote)
: 3.11.1
Assigned To: Alexei Volkov
:
Mentors:
http://bonsai.mozilla.org/cvsblame.cg...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-16 08:06 PDT by timeless
Modified: 2007-03-23 00:52 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
fix (1.12 KB, patch)
2006-04-20 10:26 PDT, Alexei Volkov
nelson: review+
Details | Diff | Splinter Review

Description timeless 2006-04-16 08:06:00 PDT
found by coverity
Comment 1 Nelson Bolyard (seldom reads bugmail) 2006-04-17 17:17:26 PDT
Several places we see code that does this in error paths:

 364   	PORT_Free(slot);
 365   	return slot;

Clearly that should be return NULL in each place.
Comment 2 Alexei Volkov 2006-04-20 10:26:27 PDT
Created attachment 219160 [details] [diff] [review]
fix
Comment 3 Nelson Bolyard (seldom reads bugmail) 2006-04-20 23:27:41 PDT
Comment on attachment 219160 [details] [diff] [review]
fix

r=nelson
Comment 4 Alexei Volkov 2006-04-21 16:31:20 PDT
tip:
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11slot.c,v  <--  pk11slot.c
new revision: 1.88; previous revision: 1.87

3.11 branch:
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11slot.c,v  <--  pk11slot.c
new revision: 1.87.2.1; previous revision: 1.87
Comment 5 Nelson Bolyard (seldom reads bugmail) 2006-06-10 18:58:46 PDT
CID 289
Comment 6 chris hofmann 2007-03-22 15:13:07 PDT
should this fix get picked up on the branch for the next firefox release?
Comment 7 Nelson Bolyard (seldom reads bugmail) 2007-03-22 16:53:11 PDT
Chris, What version of NSS is now being used in FF ?
Comment 8 Daniel Veditz [:dveditz] 2007-03-23 00:19:58 PDT
FF2.0.0.1 uses NSS 3.11.4,
FF2.0.0.2 and FF1.5.0.10 use NSS 3.11.5

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