Closed
Bug 353777
Opened 19 years ago
Closed 19 years ago
Klocwork Null ptr dereferences in pk11obj.c
Categories
(NSS :: Libraries, defect, P2)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.12
People
(Reporter: nelson, Assigned: alvolkov.bgs)
Details
(Keywords: klocwork)
Attachments
(1 file)
|
1.52 KB,
patch
|
nelson
:
review+
|
Details | Diff | Splinter Review |
ID: 88588
Function: PK11_FindGenericObjects
Location: nss/lib/pk11wrap/pk11obj.c
Function: PK11_FindGenericObjects
Location: nss/lib/pk11wrap/pk11obj.c : 1190
Null pointer 'firstObj' that comes from line 1175 may be dereferenced by
passing argument 1 to function 'PK11_DestroyGenericObjects' at line 1190.
1175 PK11GenericObject *firstObj = NULL;
1187 for (i=0; i < count; i++) {
1188 obj = PORT_New(PK11GenericObject);
1189 if ( !obj ) {
1190 PK11_DestroyGenericObjects(firstObj);
ID: 88569
Function: PK11_DestroyGenericObjects
Location: nss/lib/pk11wrap/pk11obj.c : 1292
Dereference of pointer 'objects' at line 1292 before NULL check at line 1294
1288 SECStatus
1289 PK11_DestroyGenericObjects(PK11GenericObject *objects)
1290 {
1291 PK11GenericObject *nextObject;
1292 PK11GenericObject *prevObject = objects->prev;
1293
1294 if (objects == NULL) {
1295 return SECSuccess;
1296 }
| Assignee | ||
Comment 1•19 years ago
|
||
Assignee: nobody → alexei.volkov.bugs
Status: NEW → ASSIGNED
Attachment #241190 -
Flags: review?(nelson)
| Reporter | ||
Comment 2•19 years ago
|
||
Comment on attachment 241190 [details] [diff] [review]
fix
r=nelson for trunk
Attachment #241190 -
Flags: review?(nelson) → review+
| Reporter | ||
Updated•19 years ago
|
Priority: -- → P2
Target Milestone: --- → 3.12
| Assignee | ||
Comment 3•19 years ago
|
||
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11obj.c,v <-- pk11obj.c
new revision: 1.14; previous revision: 1.13
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•