RESOLVED FIXED 22750
[gtk] webkit up to r39121 crash on image urls like http:///sitename.com
https://bugs.webkit.org/show_bug.cgi?id=22750
Summary [gtk] webkit up to r39121 crash on image urls like http:///sitename.com
Alexander Butenko
Reported 2008-12-08 20:27:54 PST
attached a saved html on which i get repeatable crash with midori-git and webkit-svn. File is a wget'ed output of http://cgi.ebay.com/IBM-Lenovo-ThinkPad-X61-C2D-12-1-120GB-3G-HSPDA_W0QQitemZ270313235609QQcmdZViewItemQQptZLaptops_Nov05?hash=item270313235609&_trksid=p3286.c0.m14&_trkparms=72%3A1234%7C66%3A2%7C65%3A12%7C39%3A1%7C240%3A1318%7C301%3A1%7C293%3A1%7C294%3A50 webkit is built with ./configure --with-http-backend=soup --prefix=/usr/ --disable-svg --disable-geolocation --disable-video --enable-optimizations
Attachments
test case (96.93 KB, text/html)
2008-12-08 20:33 PST, Alexander Butenko
no flags
core from webkit-debug (9.65 KB, text/plain)
2008-12-11 13:26 PST, Alexander Butenko
no flags
gdb bt (9.65 KB, text/plain)
2008-12-11 13:26 PST, Alexander Butenko
no flags
gdb run (8.32 KB, text/plain)
2008-12-11 13:27 PST, Alexander Butenko
no flags
new simplified test (29 bytes, text/plain)
2008-12-23 20:58 PST, Alexander Butenko
no flags
patch which fixes a crash (735 bytes, patch)
2008-12-24 09:25 PST, Alexander Butenko
zecke: review-
updated patch (1.48 KB, patch)
2008-12-24 18:43 PST, Alexander Butenko
no flags
coding style fix (1.46 KB, patch)
2008-12-27 10:39 PST, Alexander Butenko
no flags
typo (1.46 KB, patch)
2008-12-27 10:44 PST, Alexander Butenko
zecke: review+
Alexander Butenko
Comment 1 2008-12-08 20:33:07 PST
Created attachment 25870 [details] test case
Alexander Butenko
Comment 2 2008-12-11 13:26:29 PST
Created attachment 25959 [details] core from webkit-debug
Alexander Butenko
Comment 3 2008-12-11 13:26:59 PST
Alexander Butenko
Comment 4 2008-12-11 13:27:21 PST
Created attachment 25961 [details] gdb run
Alexander Butenko
Comment 5 2008-12-23 20:57:11 PST
ok. stripped down html source and found where is an issue. Now, im getting stable crash on a simple html page like: <img src=http:///google.com> Three slashes in image url is a cause of a crash.
Alexander Butenko
Comment 6 2008-12-23 20:58:03 PST
Created attachment 26234 [details] new simplified test
Alexander Butenko
Comment 7 2008-12-24 09:25:18 PST
Created attachment 26238 [details] patch which fixes a crash
Holger Freyther
Comment 8 2008-12-24 18:04:41 PST
Comment on attachment 26238 [details] patch which fixes a crash Please see http://webkit.org/coding/contributing.html and attach a new version with a ChangeLog and an applyable patch. > --- ResourceHandleSoup.cpp 2008-12-24 13:16:59.000000000 -0400 > +++ ResourceHandleSoup.cpp.new 2008-12-24 13:18:07.000000000 -0400 > @@ -335,7 +335,8 @@ > > if (equalIgnoringCase(protocol, "data")) > return startData(urlString); > - else if (equalIgnoringCase(protocol, "http") || equalIgnoringCase(protocol, "https")) > + else if ( (equalIgnoringCase(protocol, "http") || equalIgnoringCase(protocol, "https") ) && > + SOUP_URI_VALID_FOR_HTTP(soup_uri_new(urlString.utf8().data()))) > return startHttp(urlString); why did you decide to do this check here and not within startHttp? Is there anyone else calling startHttp?
Alexander Butenko
Comment 9 2008-12-24 18:27:46 PST
the point of the check here is that once url will not be valid we will fallback to last 'else' to call didFail() without a code duplication. I will update patch shortly to include changelog.
Alexander Butenko
Comment 10 2008-12-24 18:43:20 PST
Created attachment 26243 [details] updated patch
Holger Freyther
Comment 11 2008-12-26 06:50:54 PST
(In reply to comment #10) > Created an attachment (id=26243) [review] Okay, I'm convinced that this is the right patch. There is one minor style issue thiugh. Would you mind uploading a new patch without the extra whitespace in the if? WebKit.org has a rather strict CodingStyle.
Alexander Butenko
Comment 12 2008-12-27 10:39:21 PST
Created attachment 26269 [details] coding style fix
Alexander Butenko
Comment 13 2008-12-27 10:44:31 PST
Holger Freyther
Comment 14 2008-12-31 06:07:39 PST
Comment on attachment 26270 [details] typo thanks.
Holger Freyther
Comment 15 2008-12-31 08:38:03 PST
Landed in r39528.
Note You need to log in before you can comment on or make changes to this bug.