[webkit-reviews] review denied: [Bug 25645] SVG - numeric overflow for very large elements : [Attachment 58370] Revised (v6) patch to fix SVG number parsing of large numbers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 11 04:37:54 PDT 2010


Nikolas Zimmermann <zimmermann at kde.org> has denied W. James MacLean
<wjmaclean at chromium.org>'s request for review:
Bug 25645: SVG - numeric overflow for very large elements
https://bugs.webkit.org/show_bug.cgi?id=25645

Attachment 58370: Revised (v6) patch to fix SVG number parsing of large numbers
https://bugs.webkit.org/attachment.cgi?id=58370&action=review

------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
Patch looks good. I made up my mind regarding safeFloatToInt, I find it rather
dangerous to hardcode these values. How about using:
static inline int safeFloatToInt(float x)
{
    static const int s_intMax = std::numeric_limit<int>::max();
    static const int s_intMax = std::numeric_limit<int>::min();

    if (x >= float(intMax) + 1.0f)
	return intMax;
    if (x < float(intMin)
	return intMin; // NOTE: You've returned intMin + 1, I don't know why
intMin, is not allowed. But if you see errors with intMin, just return intMin+1

    return static_cast<int>(x);
}

Sorry for bringing up this so late :(


More information about the webkit-reviews mailing list