Closed
Bug 195460
Opened 23 years ago
Closed 23 years ago
Mozilla crashes when sending out a mail with a Ja img file inserted
Categories
(MailNews Core :: Internationalization, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: ji, Assigned: ftang)
Details
(Keywords: crash, intl, regression, Whiteboard: [adt1][ETA: pending on a=])
Attachments
(1 file)
|
613 bytes,
patch
|
nhottanscp
:
review+
alecf
:
superreview+
asa
:
approval1.4+
|
Details | Diff | Splinter Review |
Build: 02/21 trunk
Steps to reproduce:
1. Open a mail compose window
2. Enter some Ja chars in the subject and mail body
3. Select Insert | Image..
4. From file dialog, select a img file with Ja filename
5. Change the mail encoding to ISO-2022-JP and click on Send,
Mozilla crashes.
NS7.02 Ja doesn't crash, but the image filename is changed to ascii filename
after received.
Incident ID 17605966
Stack Signature HankakuToZenkaku ada99f09
Email Address ji@netscape.com
Product ID MozillaTrunk
Build ID 2003022105
Trigger Time 2003-02-28 13:14:59
Platform Win32
Operating System Windows NT 5.1 build 2600
Module i18n.dll
URL visited
User Comments
Trigger Reason Access violation
Source File Name
c:/builds/seamonkey/mozilla/intl/unicharutil/src/nsHankakuToZenkaku.cpp
Trigger Line No. 128
Stack Trace
HankakuToZenkaku
[c:/builds/seamonkey/mozilla/intl/unicharutil/src/nsHankakuToZenkaku.cpp, line 128]
nsHankakuToZenkaku::Change
[c:/builds/seamonkey/mozilla/intl/unicharutil/src/nsHankakuToZenkaku.cpp, line 159]
generate_encodedwords
[c:/builds/seamonkey/mozilla/mailnews/mime/src/comi18n.cpp, line 347]
apply_rfc2047_encoding
[c:/builds/seamonkey/mozilla/mailnews/mime/src/comi18n.cpp, line 805]
MIME_EncodeMimePartIIStr
[c:/builds/seamonkey/mozilla/mailnews/mime/src/comi18n.cpp, line 1165]
nsMimeConverter::EncodeMimePartIIStr_UTF8
[c:/builds/seamonkey/mozilla/mailnews/mime/src/nsMimeConverter.cpp, line 158]
nsMsgI18NEncodeMimePartIIStr
[c:/builds/seamonkey/mozilla/mailnews/base/util/nsMsgI18N.cpp, line 402]
mime_generate_attachment_headers
[c:/builds/seamonkey/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp, line 818]
nsMsgComposeAndSend::PreProcessPart
[c:/builds/seamonkey/mozilla/mailnews/compose/src/nsMsgSend.cpp, line 1307]
nsMsgComposeAndSend::GatherMimeAttachments
[c:/builds/seamonkey/mozilla/mailnews/compose/src/nsMsgSend.cpp, line 1153]
nsMsgAttachmentHandler::UrlExit
[c:/builds/seamonkey/mozilla/mailnews/compose/src/nsMsgAttachmentHandler.cpp,
line 1222]
FetcherURLDoneCallback
[c:/builds/seamonkey/mozilla/mailnews/compose/src/nsMsgAttachmentHandler.cpp,
line 482]
nsURLFetcher::OnStopRequest
[c:/builds/seamonkey/mozilla/mailnews/compose/src/nsURLFetcher.cpp, line 323]
nsDocumentOpenInfo::OnStopRequest
[c:/builds/seamonkey/mozilla/uriloader/base/nsURILoader.cpp, line 256]
nsFileChannel::OnStopRequest
[c:/builds/seamonkey/mozilla/netwerk/protocol/file/src/nsFileChannel.cpp, line 564]
nsCOMPtr_base::assign_with_AddRef
[c:/builds/seamonkey/mozilla/xpcom/glue/nsCOMPtr.cpp, line 70]
nsInputStreamPump::OnStateStop
[c:/builds/seamonkey/mozilla/netwerk/base/src/nsInputStreamPump.cpp, line 471]
nsInputStreamPump::OnInputStreamReady
[c:/builds/seamonkey/mozilla/netwerk/base/src/nsInputStreamPump.cpp, line 325]
From callstack, it looks like it crashes at HankakuToZenkaku, but I don't have
Hankaku katakana in the mail.
Comment 3•23 years ago
|
||
The hankaku -> zenkaku conversion is always done for ISO-2022-JP messages.
I don't think the function changed recently, so I assume something garbage data
was passed in. Did this start from 2/21/2003?
And crashes on 1/16 trunk build too. No more old trunk builds on my machine.
Comment 6•23 years ago
|
||
i18n triage team: nsbeta1+/adt1
Comment 8•23 years ago
|
||
Was this tesed on JA locale? Is this specific to image attachment or it can be
any attachment?
Yes, this was tested in Ja locale. The function is for inserting an image, so
only tested with an image file.
Comment 10•23 years ago
|
||
Does it also crash when the image file is attached by "File -> Attach File..."?
| Reporter | ||
Comment 11•23 years ago
|
||
No, it doesn't crash in that case.
Comment 12•23 years ago
|
||
Xianglan, does it crash in current builds? Thanks.
| Reporter | ||
Comment 13•23 years ago
|
||
yes, it still crashes on 2003051604-trunk build.
| Assignee | ||
Comment 14•23 years ago
|
||
| Assignee | ||
Comment 15•23 years ago
|
||
the crash happen in line 123 or 125 when the aLen is 0. The caller first call
aString.setCapacity then call the crashing function. I guess the reason it does
not crash before is when the capacilty set to 0 we used to allocation some
buffer for it but now change.
The patch is simple. Check the length = 0 condiction and return in the beginning
of the function
87 void HankakuToZenkaku (
88 const PRUnichar* aSrc, PRInt32 aLen,
89 PRUnichar* aDest, PRInt32 aDestLen, PRInt32* oLen)
90 {
91
92 PRInt32 i,j;
93 // loop from the first to the last char except the last one.
94 for(i = j = 0; i < (aLen-1); i++,j++,aSrc++, aDest++)
95 {
[96...118, some code]
119 }
120
121 // handle the last character
122 if(IS_HANKAKU(*aSrc))
123 *aDest = gBasicMapping[(*aSrc) - 0xff60];
124 else
125 *aDest = *aSrc;
126
127 *oLen = j+1;
128 }
Whiteboard: [adt1] → [adt1][ETA: pending on r=,sr=,a=]
| Assignee | ||
Updated•23 years ago
|
Attachment #124742 -
Flags: superreview?(alecf)
Attachment #124742 -
Flags: review?(nhotta)
Updated•23 years ago
|
Attachment #124742 -
Flags: review?(nhotta) → review+
| Assignee | ||
Updated•23 years ago
|
Attachment #124742 -
Flags: approval1.4?
Comment 16•23 years ago
|
||
Comment on attachment 124742 [details] [diff] [review]
patch fix crash
sr=alecf
Attachment #124742 -
Flags: superreview?(alecf) → superreview+
Comment 17•23 years ago
|
||
a=adt to land this on the 1.4 branch once you get drivers' approval. Please add
the fixed1.4 keyword once you land this fix.
| Assignee | ||
Updated•23 years ago
|
Whiteboard: [adt1][ETA: pending on r=,sr=,a=] → [adt1][ETA: pending on a=]
| Assignee | ||
Updated•23 years ago
|
Flags: blocking1.4?
Comment 18•23 years ago
|
||
Comment on attachment 124742 [details] [diff] [review]
patch fix crash
a=asa (on behalf of drivers) for checkin to the 1.4 branch.
Attachment #124742 -
Flags: approval1.4? → approval1.4+
| Assignee | ||
Comment 19•23 years ago
|
||
fixed and check in at Jun 3, 2003 13:25. Somehow I fogot to login mozilla when
I change the state to fixed1.4 and FIXED so the bug still say it is new.
| Reporter | ||
Comment 20•23 years ago
|
||
the crash is verified as fixed in 2003060508 1.4 branch build.
But the Ja filename is not MIME encoded. Filed a separate bug as bug 208476
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•