Closed Bug 336482 Opened 15 years ago Closed 15 years ago
Coverity crash or hopefully deadcode [@ crmf
_copy _poposigningkey] because Pointer "dest Popo Sign Key" dereferenced before NULL check
this looks like something that could be asserted, but at the very least, the null check in loser is pointless.
Hardware: PC → All
Target Milestone: --- → 3.11.2
Not a bug, us all callers of the functions check for NULL the destination pointer before copy data into it. Non of the object copy functions check for incoming parameter before dereferencing them. This functionality should be implemented in a caller. The patch removes unnecessary checks for NULL before structure destruction.
Attachment #221868 - Flags: review?(nelson)
Comment on attachment 221868 [details] [diff] [review] remove null check I have a feeling that someday we'll see these functions get called with NULL arguments, and someone will ask why the function doesn't check its arguments for NULL as the very first thing. But this patch is no less correct than before, and it should silence Coverity. So r=nelson
Attachment #221868 - Flags: review?(nelson) → review+
trunk /cvsroot/mozilla/security/nss/lib/crmf/servget.c,v <-- servget.c new revision: 1.5; previous revision: 1.4 3.11 branch /cvsroot/mozilla/security/nss/lib/crmf/servget.c,v <-- servget.c new revision: 126.96.36.199; previous revision: 188.8.131.52
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: CID 631
Summary: crash or hopefully deadcode [@ crmf_copy_poposigningkey] because Pointer "destPopoSignKey" dereferenced before NULL check → Coverity crash or hopefully deadcode [@ crmf_copy_poposigningkey] because Pointer "destPopoSignKey" dereferenced before NULL check
Crash Signature: [@ crmf_copy_poposigningkey]
You need to log in before you can comment on or make changes to this bug.