Closed Bug 469622 Opened 16 years ago Closed 15 years ago

Coverity errors reported in ckfw

Categories

(NSS :: Libraries, defect)

3.12
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.12.7

People

(Reporter: nelson, Assigned: shailen.n.jain)

Details

(Keywords: coverity)

Attachments

(1 file)

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.
Attached patch Patch V 1Splinter Review
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)
Attachment #430912 - Flags: superreview?(rrelyea)
Attachment #430912 - Flags: review?(nelson)
Attachment #430912 - Flags: review+
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 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)
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.

Attachment

General

Creator:
Created:
Updated:
Size: