Closed Bug 1226584 Opened 9 years ago Closed 5 years ago

[Static Analysis][Called function pointer is null (null dereference)] Function nssCKFWMechanism_Destroy from security/nss/lib/ckfw/mechanism.c potentially causes a pointer to function null dereference

Categories

(NSS :: Libraries, defect, P3)

defect

Tracking

(firefox45 affected)

RESOLVED INVALID
Tracking Status
firefox45 --- affected

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: clang-analyzer)

Attachments

(2 obsolete files)

The Static Analysis tool Scan-Build added a potentially null pointer dereference on pointer fwMechanism->mdMechanism->Destroy.
Attached patch Bug 1226584.diff (obsolete) — Splinter Review
Component: Security → Libraries
Product: Core → NSS
Version: Trunk → trunk
Attached patch Bug 1226584.diff (obsolete) — Splinter Review
Hello Bob,

Could you please take a look other this patch in security\nss\lib\ckfw\mechanism.c ? I've tried to fix an issue that scan-build (clang analyzer) pointed out that dereferencing fwMechanism->mdMechanism->Destroy causes a null pointer dereference in:

NSS_IMPLEMENT void
nssCKFWMechanism_Destroy
(
  NSSCKFWMechanism *fwMechanism
)

In this patch i've completly removed the if condition but maybe if fwMechanism->mdMechanism->Destroy is a valud pointer should we call the function to witch it points?

Many thanks
Flags: needinfo?(rrelyea)
Priority: -- → P3

Closing this as the code is no longer in accordance with the patch.

Status: NEW → RESOLVED
Closed: 5 years ago
QA Contact: jjones
Resolution: --- → INVALID
Attachment #8690066 - Attachment is obsolete: true
Attachment #8691981 - Attachment is obsolete: true
Flags: needinfo?(rrelyea)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: