Summary: | Make overflow guards in WTF::String::utf8 explicit | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Component: | Web Template Framework | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | barraclough, oliver | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
David Kilzer (:ddkilzer)
2010-11-16 17:27:45 PST
Created attachment 74071 [details]
Patch
Comment on attachment 74071 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74071&action=review > JavaScriptCore/wtf/text/WTFString.cpp:700 > + if (length > numeric_limits<unsigned>::max() / 3) If we changed the type of the local variable length to size_t instead of unsigned, then this could just check against size_t instead of unsigned, giving us a higher limit on 64-bit platforms. (In reply to comment #3) > (From update of attachment 74071 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=74071&action=review > > > JavaScriptCore/wtf/text/WTFString.cpp:700 > > + if (length > numeric_limits<unsigned>::max() / 3) > > If we changed the type of the local variable length to size_t instead of unsigned, then this could just check against size_t instead of unsigned, giving us a higher limit on 64-bit platforms. Thanks. I filed Bug 49637. Committed r72209: <http://trac.webkit.org/changeset/72209> |