[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


           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;
    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