Reproducable segfault when loading text file over HTTP

RESOLVED FIXED

Status

P3
normal
RESOLVED FIXED
19 years ago
7 years ago

People

(Reporter: aaronl, Assigned: blizzard)

Tracking

Trunk
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
The following will segfault Skipstone, Galeon, and TestGtkEmbed:

Go to a HTTP file listing (e.g. http://incoming.debian.org), click on any text
file (e.g. anything ending in .dsc or .changes). The URL field will not change,
and the back button will not be activated. If you press enter in the unchanged
URL field, there will be a segfault, even if you first change the text of the
URL field to something completely different.

Version: CVS mozilla as of 10/21/00

Comment 1

19 years ago
-> blizzard
Assignee: pavlov → blizzard
(Assignee)

Updated

19 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Comment 2

19 years ago
The fix here is to add text/plain to the list of supported flavors in the
nsIURIContentListener::IsPreferred() method.  However, this is pretty scary
because it means that if you return a denial from that method it still loads it
and puts the docshell into an unusable state.

Still looking for a review to fix the crash in the meantime.  Can you guys have
a quick look at this?  The patch below is in
embedding/browser/gtk/src/GtkMozEmbedChrome.cpp in the IsPreferred() method.
It's mixed in with a lot of other patches which is why it looks like this.

   {
     PR_LOG(mozEmbedLm, PR_LOG_DEBUG, ("checking content type %s\n", aContentTyp
e));
     if (nsCRT::strcasecmp(aContentType,  "text/html") == 0
+       || nsCRT::strcasecmp(aContentType, "text/plain") == 0
         || nsCRT::strcasecmp(aContentType, "text/xul") == 0
         || nsCRT::strcasecmp(aContentType, "text/rdf") == 0
         || nsCRT::strcasecmp(aContentType, "text/xml") == 0
(Assignee)

Comment 3

19 years ago
Can someone review this change?  A lot of people are running into this problem
and I'd like to get a fix in until we fix the larger issue.

Comment 4

19 years ago
r=valeski
I think mscott or rpotts should super-review.

/be

Comment 6

19 years ago
I'm cool with adding text/plain to this method.

sr=mscott
(Assignee)

Comment 7

19 years ago
Checked in.  Thanks, guys.
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
Component: Embedding: GTK Widget → Embedding: GTK Widget
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.