Crash in FontCache::releaseFontData due to infinite float size.
https://bugs.webkit.org/show_bug.cgi?id=86110
Reviewed by Andreas Kling.
Source/WebCore:
New callers always forget to clamp the font size, which overflows
to infinity on multiplication. It is best to clamp it at the end
to avoid getting greater than std::numeric_limits<float>::max().
Test: fast/css/large-font-size-crash.html
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::setComputedSize):
(WebCore::FontDescription::setSpecifiedSize):
LayoutTests:
* fast/css/large-font-size-crash-expected.txt: Added.
* fast/css/large-font-size-crash.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed