Closed Bug 504405 Opened 15 years ago Closed 15 years ago

pkix_pl_CrlDp_Create will fail on alloc success because of a missing !

Categories

(NSS :: Libraries, defect, P2)

3.12.3

Tracking

(Not tracked)

RESOLVED FIXED
3.12.4

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

(Keywords: coverity)

Attachments

(1 file)

154 rdnArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
155 if (rdnArena) {
156   PKIX_ERROR(PKIX_PORTARENAALLOCFAILED);
157 }
158 issuerNameCopy = (CERTName *)PORT_ArenaZNew(rdnArena, CERTName*);

you wanted it the other way.
Group: core-security
Group: core-security
Blocks: CRLDP
Attached patch patchSplinter Review
Attachment #388777 - Flags: review?(nelson)
Severity: blocker → critical
Keywords: crash
timeless, I agree that the code is wrong, and your patch fixes it.
But I see no crash here, not even a leak.  Where do you see it?  
Is it a crash in the caller of this function? 
If so, this patch doesn't correct the actual cause of the crash.
sorry. i didn't mean crash...

it will crash on alloc failure :)
Summary: pkix_pl_CrlDp_Create will crash on alloc success because of a missing ! → pkix_pl_CrlDp_Create will fail on alloc success because of a missing !
Severity: critical → major
Comment on attachment 388777 [details] [diff] [review]
patch

r=nelson.  I will commit.
Attachment #388777 - Flags: review?(nelson) → review+
Priority: -- → P2
Target Milestone: --- → 3.12.4
Version: trunk → 3.12.3
module/pkix_pl_aiamgr.c; new revision: 1.12; previous revision: 1.11
pki/pkix_pl_crldp.c;     new revision: 1.2;  previous revision: 1.1
Assignee: alexei.volkov.bugs → timeless
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: