Closed
Bug 40094
Opened 25 years ago
Closed 25 years ago
Crash if IMG SRC has typo in hostname portion
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: sidr, Assigned: adamlock)
References
()
Details
(Keywords: crash, verifyme, Whiteboard: [nsbeta2+][6/15])
Attachments
(1 file)
|
1.41 KB,
patch
|
Details | Diff | Splinter Review |
Overview:
A document with an <IMG> whose SRC is at a URL at a host not findable in DNS
will crash the browser. This blocks testing for bug 39788, "bad url in image tag
displays dialog".
Steps to reproduce:
1. View http://bugzilla.mozilla.org/showattachment.cgi?attach_id=8956,
which contains <img src="http://www.ntscape.com/hello.gif" alt="hello">
Actual Result:
Crash. Talback Incident ID: TB10944105Q
Expected result:
the ALT text should display as the SRC won't fetch anything.
Tested with:
The 2000-05-21-08-M16 nightly bianry on WinNT.
Additional Information:
Typing http://www.ntscape.com/hello.gif into the URL bar results in an alert
reading" www.ntscape.com could not be found..."; no crash.
Guessing wildly that this is an "HTML Element" problem.
| Reporter | ||
Updated•25 years ago
|
| Reporter | ||
Updated•25 years ago
|
Comment 1•25 years ago
|
||
I just tried this and it is fine for me, on WinNT with a local pull from Friday.
I also downloaded the 5/22 daily and it does crash there, however only when I
download the testcase to a local file...
Anyway, the problem is that the method nsWebShell::OnEndDocumentLoad is calling:
PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host);
if (!msg) return NS_ERROR_OUT_OF_MEMORY;
with host being null - the smprintf assumes the param is non-null, dereferences
it and we crash. A simple check for null should be made here...
I'll attach a patch to this bug. I also think this should be nsbeta2 so I'm
changing the keyword - it is a crash that is going to be somewhat common I think
(misspelled or otherwise invalid DNS entries?)
Comment 2•25 years ago
|
||
Fix checked in. Approved by Jud
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
build 2000062008
no longer crash when loading the URL above ( testcase attach_id 8956)
Yep..I loaded too, looks good with Win32 2000-07-18-11 build. marking Verified
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•