[Webkit-unassigned] [Bug 39010] New: QtField::name() returns a dangling pointer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 12 11:45:09 PDT 2010


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

           Summary: QtField::name() returns a dangling pointer
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: agbakken at gmail.com


QObject::objectName() returns a QString and the QtField::name() creates a temporary QByteArray object and returns constData() from it.
This is not safe.
The attached fix changes the signature to be a QByteArray instead of const char* and makes it non-virtual (since it never should have been). It's not a Bindings::Field function but rather an implementation detail in QtField and it's never reimplemented.

The patch also includes a minor optimization to use const & in a foreach loop which is faster.

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