[Webkit-unassigned] [Bug 43342] New: AtomicStringHash does not work with null atomic string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 2 06:07:09 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43342

           Summary: AtomicStringHash does not work with null atomic string
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: Text
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: benjamin.poulain at nokia.com
                CC: benjamin.poulain at nokia.com


The current implementation of AtomicStringHash crashes with null string.

The reason is the hashing, done like this: 
        static unsigned hash(const AtomicString& key)
        {
            return key.impl()->existingHash();
        }
In that code, key.impl() can be null.


This causes a crash with the following code (because of the null string family):

#include <QtGui>
#include <QtWebKit>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QWebSettings *settings = QWebSettings::globalSettings();
    settings->setFontFamily(QWebSettings::StandardFont, QString());

    QWebView view;
    view.load(QUrl("http://www.pro-linux.de/news/1/15917/opensuse-113-veroeffentlicht.html"));
    view.show();
    return app.exec();
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list