Closed
Bug 469622
Opened 16 years ago
Closed 15 years ago
Coverity errors reported in ckfw
Categories
(NSS :: Libraries, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
3.12.7
People
(Reporter: nelson, Assigned: shailen.n.jain)
Details
(Keywords: coverity)
Attachments
(1 file)
1.11 KB,
patch
|
nelson
:
review+
rrelyea
:
superreview+
|
Details | Diff | Splinter Review |
File nss/lib/ckfw/token.c function nssCKFWToken_Destroy
CID 1384 - pointer dereference before NULL check
393 nssCKFWHash_Iterate(fwToken->mdObjectHash, nss_ckfwtoken_object_iterator,
394 (void *)NULL);
395 if (fwToken->mdObjectHash) {
396 nssCKFWHash_Destroy(fwToken->mdObjectHash);
397 }
Here, fwToken->mdObjectHash is passed to nssCKFWHash_Iterate, which
dereferences it. THEN it is checked for NULL.
Hi Nelson,
I moved the if condition one line above to ensure fwToken->mdObjectHash is not NULL before fwToken->mdObjectHash being dereferenced through nssCKFWHash_Iterate.
Please review and let me know I had missed anything.
Regards,
Shailendra
Attachment #430912 -
Flags: review?(nelson)
Reporter | ||
Updated•15 years ago
|
Attachment #430912 -
Flags: superreview?(rrelyea)
Attachment #430912 -
Flags: review?(nelson)
Attachment #430912 -
Flags: review+
Reporter | ||
Comment 2•15 years ago
|
||
Comment on attachment 430912 [details] [diff] [review]
Patch V 1
I believe this patch is correct.
Bob, do you agree?
If so, please SR and commit.
Comment 3•15 years ago
|
||
Comment on attachment 430912 [details] [diff] [review]
Patch V 1
r+ seems right to me as well.
Attachment #430912 -
Flags: superreview?(rrelyea) → superreview+
please lose the trailing space when you commit this (i just wrote this patch myself)
Reporter | ||
Comment 5•15 years ago
|
||
Committed token.c rev 1.16
Thanks Shailendra
Assignee: rrelyea → shailen.n.jain
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12.7
You need to log in
before you can comment on or make changes to this bug.
Description
•