Closed Bug 334327 Opened 20 years ago Closed 20 years ago

pk11_CreateNewContextInSlot: Variable "(context)->key" tracked as NULL was passed to a function that dereferences it.

Categories

(NSS :: Libraries, defect, P2)

3.11
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.1

People

(Reporter: timeless, Assigned: nelson)

References

()

Details

(Keywords: coverity, Whiteboard: [CID 301 718])

Attachments

(1 file)

found by coverity
Assignee: kengert → nobody
Assignee: nobody → nelson
OS: Linux → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → 3.11.1
Version: 4.0 → 3.11
Please review.
Attachment #218744 - Flags: review?(alexei.volkov.bugs)
Add reviewer to CC list, so he can see the bug!
Comment on attachment 218744 [details] [diff] [review] Detect NULL symkey Looks ok. I also think that PORT_Assert one line before changes should check for the same things. Another observation is that one of the caller of pk11_CreateNewContextInSlot - PK11_CreateContextBySymKey also dereferences same key without checking it for NULL.
Attachment #218744 - Flags: review?(alexei.volkov.bugs) → review+
(In reply to comment #3) > Another observation is that one of the caller of pk11_CreateNewContextInSlot - > PK11_CreateContextBySymKey > also dereferences same key without checking it for NULL. Alexei, please check in the above patch for me, and also write a patch to fix the problem you discovered in PK11_CreateContextBySymKey. I'll review it.
Check in tip: /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11cxt.c,v <-- pk11cxt.c new revision: 1.3; previous revision: 1.2 Check in branch: /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11cxt.c,v <-- pk11cxt.c new revision: 1.2.28.1; previous revision: 1.2
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
CID 718
Whiteboard: CID 718
Also CID 301. Related to bug 338071
Whiteboard: CID 718 → [CID 301 718]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: