Closed Bug 225570 Opened 20 years ago Closed 20 years ago
Msg Compose carefully avoids using Get Type From File
In nsMsgCompose::ProcessSignature: the code has an nsILocalFile to work with but, it gets the nativePath from it, inits a filespec with it, then CIs a nsIFileURL, inits it with the native path, gets the extension from that, and asks the mimeservice for the type. it should simply ask the mimeservice for the type of the nsILocalFile. (using the GetTypeFromFile method)
Attachment #135402 - Flags: review?(mscott)
Status: NEW → ASSIGNED
Attachment #135402 - Flags: review?(mscott) → review?(ducarroz)
Attachment #135402 - Flags: review?(ducarroz) → review?(bienvenu)
Attachment #135402 - Flags: review?(bienvenu) → review?(bzbarsky)
Comment on attachment 135402 [details] [diff] [review] something like this r=bzbarsky
Attachment #135402 - Flags: review?(bzbarsky) → review+
Checking in mailnews/compose/src/nsMsgCompose.cpp; /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v <-- nsMsgCompose.cpp new revision: 1.412; previous revision: 1.411 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
This checkin have added a "may be used uninitialized" warning on brad TBox: +mailnews/compose/src/nsMsgCompose.cpp:3320 + `nsresult rv' might be used uninitialized in this function Indeed, if identity is NULL on line 3348, then on line 3385, it will try testing NS_FAILED on an unitialized rv - see http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/compose/src/nsMsgCompose.cpp&rev=1.412&mark=3348,3385#3320 Should I file a new bug for this or reopen this one?
Fix checked in for the warning.
You need to log in before you can comment on or make changes to this bug.