Closed
Bug 297584
Opened 20 years ago
Closed 20 years ago
MS IE profile migration code casts LPWSTR to |char *| and treats the result as UTF-8
Categories
(Firefox :: Migration, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jshin1987, Assigned: jshin1987)
Details
Attachments
(1 file, 1 obsolete file)
|
2.42 KB,
patch
|
Biesinger
:
review+
darin.moz
:
superreview+
asa
:
approval-aviary1.1a2+
|
Details | Diff | Splinter Review |
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/urlhist/structs/staturl.asp |pwcsurl| of STATURL struct is LPWSTR, but it's cast to |char *| and the result is treated as UTF-8. http://lxr.mozilla.org/seamonkey/source/browser/components/migration/src/nsIEProfileMigrator.cpp#557 556 // 3 - URL 557 url = statURL.pwcsUrl; 558 559 nsDependentCString urlStr((const char *) url); I wonder how this has ever worked....
| Assignee | ||
Comment 1•20 years ago
|
||
With this patch, I don't get any more assertion in 'UTF8 -> UTF-16 converter' and IE history items are imported properly. Btw, there may be a memory leak here because MSDN says that 'STATURL->p..url' should be freeed by a caller, but we don't. I'll see if there's indeed a leak in another bug.
| Assignee | ||
Updated•20 years ago
|
Attachment #186182 -
Flags: superreview?(darin)
Attachment #186182 -
Flags: review?(mconnor)
Comment 2•20 years ago
|
||
Could this possibly be the cause of bug 235495?
Comment 3•20 years ago
|
||
Ah, reading bug 235495 comment 10 and this patch seems to indicate that is not the case. Sorry about that, please disregard.
Comment 4•20 years ago
|
||
Comment on attachment 186182 [details] [diff] [review] patch Looks good. Do we need to worry about the memory leak?
Attachment #186182 -
Flags: superreview?(darin) → superreview+
| Assignee | ||
Comment 5•20 years ago
|
||
Thanks for sr. I confirmed that there are indeed memory leaks and I just decided to fill them up in this bug.
Attachment #186182 -
Attachment is obsolete: true
Attachment #186315 -
Flags: superreview?(darin)
Attachment #186315 -
Flags: review?(cbiesinger)
| Assignee | ||
Updated•20 years ago
|
Attachment #186182 -
Flags: review?(mconnor)
Comment 6•20 years ago
|
||
Comment on attachment 186315 [details] [diff] [review] update (fixes memory leaks as well) ohh, fun :)
Attachment #186315 -
Flags: review?(cbiesinger) → review+
Updated•20 years ago
|
Attachment #186315 -
Flags: superreview?(darin) → superreview+
| Assignee | ||
Comment 7•20 years ago
|
||
Comment on attachment 186315 [details] [diff] [review] update (fixes memory leaks as well) asking for a. this is a low risk patch that fixes the string handling in MS IE history importing code.
Attachment #186315 -
Flags: approval-aviary1.1a2?
Updated•20 years ago
|
Attachment #186315 -
Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
| Assignee | ||
Comment 8•20 years ago
|
||
landed on the trunk with the following line moved outside |if (|stat.pwcsUrl|)| just in case statURL.pwcsTitle is non-null for null stat.pwcsURL. + if (statURL.pwcsTitle) + ::CoTaskMemFree(statURL.pwcsTitle);
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•