[Webkit-unassigned] [Bug 111380] Handle CRLF in MIME types of Blobs appended to multipart FormData

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 7 01:16:31 PST 2013


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





--- Comment #29 from Benjamin Poulain <benjamin at webkit.org>  2013-03-07 01:18:55 PST ---
(From update of attachment 191664)
View in context: https://bugs.webkit.org/attachment.cgi?id=191664&action=review

> Source/WebCore/platform/network/FormDataBuilder.cpp:89
> +            if (i + 1 < length && string.data()[i + 1] == 0x0a)

Unlike WTF::String, CString is zero terminated.

Which mean you can do i + 1 on the last character, you will just get null. Thus the code could be:
    ASSERT_WITH_MESSAGE(i + 1 <= length, "Do not read past CString terminating null.");
    if (string.data()[i + 1] == 0x0a)

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