Closed
Bug 587421
Opened 15 years ago
Closed 14 years ago
PK11_PBEKeyGen leaks param because it checks type too late
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: rrelyea)
Details
(Keywords: coverity, memory-leak)
Attachments
(1 file, 1 obsolete file)
1.29 KB,
patch
|
elio.maldonado.batiz
:
review+
nelson
:
review+
|
Details | Diff | Splinter Review |
1346 PK11_PBEKeyGen(PK11SlotInfo *slot, SECAlgorithmID *algid, SECItem *pwitem,
1356 pbeAlg = SECOID_GetAlgorithmTag(algid);
1359 if (sec_pkcs5_is_algorithm_v2_pkcs5_algorithm(pbeAlg)) {
1369 pbeAlg = SECOID_GetAlgorithmTag(&pbeV2_param->pbeAlgId);
1370 param = PK11_ParamFromAlgid(&pbeV2_param->pbeAlgId);
1377 } else {
1378 param = PK11_ParamFromAlgid(algid);
1379 }
1384 type = PK11_AlgtagToMechanism(pbeAlg);
1385 if (type == CKM_INVALID_MECHANISM) {
1387 return NULL;
Comment 2•15 years ago
|
||
Comment on attachment 466133 [details] [diff] [review]
patch
Review requests for patches to pk11wrap and softoken should go to rrelyea
Attachment #466133 -
Flags: review?(nelson) → review?(rrelyea)
Assignee | ||
Comment 3•15 years ago
|
||
Comment on attachment 466133 [details] [diff] [review]
patch
r- this is hardly the way NSS normally deals with this. A more NSS-like patch forthcoming.
Attachment #466133 -
Flags: review?(rrelyea) → review-
Assignee | ||
Comment 4•15 years ago
|
||
Other reviews welcome (including timeless).
Assignee: timeless → rrelyea
Attachment #466133 -
Attachment is obsolete: true
Attachment #473624 -
Flags: review?(emaldona)
Comment 5•15 years ago
|
||
Comment on attachment 473624 [details] [diff] [review]
Fix leak if type is invalid
add'l r=nelson.
It isn't necessary to check the argument to SECITEM_ZfreeItem for null
before calling it. It will do nothing if the argument is NULL.
Attachment #473624 -
Flags: review+
Comment 6•15 years ago
|
||
Comment on attachment 473624 [details] [diff] [review]
Fix leak if type is invalid
r+ emaldona
Attachment #473624 -
Flags: review?(emaldona) → review+
Comment 7•14 years ago
|
||
Bug 587421: PK11_PBEKeyGen leaks param because it checks type too late
Patch contributed by Bob Relyea <rrelyea@redhat.com>, r=nelson
Checking in pk11wrap/pk11pbe.c; new revision: 1.26; previous revision: 1.25
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•