Closed
Bug 337085
Opened 15 years ago
Closed 15 years ago
Coverity 447, dead code in mozilla/security/nss/lib/certhigh/ocsp.c
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.2
People
(Reporter: jonsmirl, Assigned: alvolkov.bgs)
Details
(Keywords: coverity, Whiteboard: [CID 447 844])
Attachments
(1 file)
723 bytes,
patch
|
wtc
:
review+
|
Details | Diff | Splinter Review |
This one is a buglet, strdup can fail and the result wasn't checked. diff -u -r1.21.2.3 ocsp.c --- security/nss/lib/certhigh/ocsp.c 3 Apr 2006 20:15:40 -0000 1.21.2.3 +++ security/nss/lib/certhigh/ocsp.c 8 May 2006 04:33:28 -0000 @@ -1755,6 +1755,8 @@ path[len] = '\0'; } else { path = PORT_Strdup("/"); + if (path == NULL) + goto loser; } *pHostname = hostname; @@ -1765,8 +1767,6 @@ loser: if (hostname != NULL) PORT_Free(hostname); - if (path != NULL) - PORT_Free(path); PORT_SetError(SEC_ERROR_CERT_BAD_ACCESS_LOCATION); return SECFailure; }
Updated•15 years ago
|
Severity: normal → trivial
Priority: -- → P3
Attachment #221264 -
Flags: review?(wtchang)
Updated•15 years ago
|
Attachment #221264 -
Flags: review?(wtchang) → review+
Assignee | ||
Comment 2•15 years ago
|
||
trunk /cvsroot/mozilla/security/nss/lib/certhigh/ocsp.c,v <-- ocsp.c new revision: 1.24; previous revision: 1.23 3.11 branch /cvsroot/mozilla/security/nss/lib/certhigh/ocsp.c,v <-- ocsp.c new revision: 1.21.2.5; previous revision: 1.21.2.4
Assignee: nobody → alexei.volkov.bugs
Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Whiteboard: [CID 447]
You need to log in
before you can comment on or make changes to this bug.
Description
•