[webkit-reviews] review granted: [Bug 109947] Add CString operators for comparison with const char* : [Attachment 188579] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 15 09:40:08 PST 2013


Darin Adler <darin at apple.com> has granted Christophe Dumez <dchris at gmail.com>'s
request for review:
Bug 109947: Add CString operators for comparison with const char*
https://bugs.webkit.org/show_bug.cgi?id=109947

Attachment 188579: Patch
https://bugs.webkit.org/attachment.cgi?id=188579&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=188579&action=review


Seems OK. Please fix the memcmp issue too if you are touching this code.

> Source/WTF/wtf/text/CString.cpp:113
> +    return !strncmp(a.data(), b.data(), a.length());

This code should use memcmp. We don’t want the code to scan for null
characters, so strncmp is the wrong function.


More information about the webkit-reviews mailing list