Closed
Bug 1418438
Opened 7 years ago
Closed 7 years ago
document.docShell.forcedCharset crashes Firefox
Categories
(Core :: XPConnect, defect)
Tracking
()
VERIFIED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox57 | --- | wontfix |
firefox58 | --- | verified |
firefox59 | --- | verified |
People
(Reporter: Oriol, Assigned: Oriol)
References
Details
(Keywords: crash, regression)
Crash Data
Attachments
(1 file)
(deleted),
text/x-review-board-request
|
emk
:
review+
gchang
:
approval-mozilla-beta+
|
Details |
1. Load about:preferences
2. Open web console (Ctrl+Shift+K)
3. Enter this code:
document.docShell.forcedCharset
Result: Firefox crashes
Expected: The empty string
https://crash-stats.mozilla.com/report/index/dec29bdd-7ac8-4e52-96ac-704b20171117
https://crash-stats.mozilla.com/report/index/4d8166e4-da67-4b70-8827-ce6730171117
Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a584b41ad399e648c99a43e41fa5138b2ccfd491&tochange=bda394665daaaf0899717f220aa8345fe697e5dc
I suspect bug 1373984.
Assignee | ||
Updated•7 years ago
|
Blocks: 1418365
status-firefox57:
--- → affected
status-firefox58:
--- → affected
status-firefox59:
--- → affected
status-firefox-esr52:
--- → unaffected
Version: unspecified → 56 Branch
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8929593 [details]
Bug 1418438 - Avoid null deref in nsIDocShell's forcedCharset.
https://reviewboard.mozilla.org/r/200866/#review206184
::: docshell/base/nsDocShell.cpp:2190
(Diff revision 1)
> }
>
> NS_IMETHODIMP
> nsDocShell::GetForcedCharset(nsACString& aResult)
> {
> + if (mForcedCharset) {
Please truncate aCharset if mForcedCharset is null (although it is not relevant to JS callers).
Attachment #8929593 -
Flags: review?(VYV03354) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8929593 [details]
Bug 1418438 - Avoid null deref in nsIDocShell's forcedCharset.
https://reviewboard.mozilla.org/r/200866/#review206184
> Please truncate aCharset if mForcedCharset is null (although it is not relevant to JS callers).
Thanks, I considered it but thought it wasn't necessary.
Assignee | ||
Updated•7 years ago
|
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f6a49a33c53d
Avoid null deref in nsIDocShell's forcedCharset. r=emk
Keywords: checkin-needed
Comment 6•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 7•7 years ago
|
||
Hi :Oriol,
do you think if it's worth uplifting to 58 if this patch is not too risky?
Flags: needinfo?(oriol-bugzilla)
Assignee | ||
Comment 8•7 years ago
|
||
Comment on attachment 8929593 [details]
Bug 1418438 - Avoid null deref in nsIDocShell's forcedCharset.
Approval Request Comment
[Feature/Bug causing the regression]: bug 1373984.
[User impact if declined]: crash when accessing an empty nsIDocShell's forcedCharset.
[Is this code covered by automated tests?]: no.
[Has the fix been verified in Nightly?]: I have manually verified this in
Nightly.
[Needs manual test from QE? If yes, steps to reproduce]: see comment 0.
[List of other uplifts needed for the feature/fix]: none.
[Is the change risky?]: not risky.
[Why is the change risky/not risky?]: just a check to avoid a null deref.
[String changes made/needed]: none.
Flags: needinfo?(oriol-bugzilla)
Attachment #8929593 -
Flags: approval-mozilla-beta?
Comment 9•7 years ago
|
||
Tiny volume, not taking it in 57.
Comment 10•7 years ago
|
||
Comment on attachment 8929593 [details]
Bug 1418438 - Avoid null deref in nsIDocShell's forcedCharset.
Fix a potential crash. Beta58+.
Attachment #8929593 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 11•7 years ago
|
||
bugherder uplift |
Updated•7 years ago
|
Flags: qe-verify+
Comment 12•7 years ago
|
||
Verified as fixed with 59.oa1 20171126220311 and 58.0b6 on Windows 10 x64, macOS 10.12.6 and Ubuntu 14.4
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•