[Webkit-unassigned] [Bug 46695] [Qt] Invalid pointer access & incomplete memcmp in setUpIterator

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 31 11:06:37 PST 2011


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





--- Comment #5 from chris reiss <christopher.reiss at nokia.com>  2011-01-31 11:06:37 PST ---
Just seeing this code for the first time, but my initial take is that
this 
        if (iterator.isValid() && type == iterator.type() && length == iterator.length
            && memcmp(string, iterator.string, length) == 0) {
            iterator.toStart();
            return &iterator;
        }


should really be this ...

        if (iterator.isValid() && type == iterator.type() && length == iterator.length && string == iterator.string) {
            iterator.toStart();
            return &iterator;
        }

That is, we just want to make sure iterator.string is at the same place in memory as 'string'.  Then it's safe to recycle it.   Let me do some more digging and testing ...

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