Closed Bug 284034 Opened 20 years ago Closed 20 years ago

nsReadableUtils ToNew* methods crash on OOM

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: ajschult784, Assigned: ajschult784)

References

()

Details

(Keywords: crash)

Attachments

(1 file)

The methods in nsReadableUtils that allocate memory (ToNew*) don't check that the allocation succeeded. As far as I can tell, they would all crash. The Append methods might behave similarly, but the allocation is hidden inside other methods. Shouldn't the ToNew* methods just return nsnull?
Summary: nsReadableUitls ToNew* methods crash on OOM → nsReadableUtils ToNew* methods crash on OOM
yeah, sounds fine to me. patches welcome :)
Severity: normal → critical
Keywords: crash
Assignee: string → ajschult
Status: NEW → ASSIGNED
Attachment #175893 - Flags: superreview?(darin)
Attachment #175893 - Flags: review?(darin)
Attachment #175893 - Flags: superreview?(darin)
Attachment #175893 - Flags: superreview+
Attachment #175893 - Flags: review?(darin)
Attachment #175893 - Flags: review+
fixed
Severity: critical → normal
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Severity: normal → critical
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: