Closed Bug 151954 Opened 23 years ago Closed 23 years ago

Incorrect check of PR_Malloc failure in nsMsgHeaderParser::ReformatUnquotedAddresses

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dbradley, Assigned: bugzilla)

Details

Attachments

(1 file)

Ran across this in a Purify run. The test below is incorrect. The main danger is that it can give out of memory errors erroneously. char * outputStr = (char *) PR_Malloc(outputMaxLen); if (!*outputStr) return NS_ERROR_OUT_OF_MEMORY; Patch comming up.
oops! good catch...
Status: NEW → ASSIGNED
Comment on attachment 87763 [details] [diff] [review] Patch to fix the test R=ducarroz
Attachment #87763 - Flags: review+
Comment on attachment 87763 [details] [diff] [review] Patch to fix the test sr=bienvenu
Attachment #87763 - Flags: superreview+
QA Contact: gayatri → stephend
Fix checked in the trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
I read a message which contained multiple types of attachments, as well as sending myself a Python file and reading that message. I'm not sure I've hit all the MIME cases, but as far as I can tell, this is fixed. David, do you remember what error Purify threw? Verified FIXED on the trunk, Windows 2000, unless I find this somehow.
Status: RESOLVED → VERIFIED
nominating - this _might_ help the mac OS 9/8.5 platforms, where memory management is more fragile
Keywords: nsbeta1
The error was as follows: [W] UMR: Uninitialized memory read in nsMsgHeaderParser::ReformatUnquotedAddresses(WORD const*,WORD * *) {1 occurrence}
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: