New issue
Advanced search Search tips

Issue 611669 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Font caches in font/css may return incorrect fonts

Project Member Reported by tzik@chromium.org, May 13 2016

Issue description

CSSFontFaceSource and CSSSegmentedFontFace [2] have its own font caches as their member.
They are intended to map FontCacheKey to their font data, however, they use a hash value of the FontCacheKey instance for the HashMap key instead of the FontCacheKey itself. That may return incorrect font data on a hash collision, and may also cause an assertion failure if a hash value is an invalid value for HashMap key (i.e. 0 and -1).

[1]: https://chromium.googlesource.com/chromium/src/+/8839774eace3a4b0427c531d6f3ce8a2bfe6552a/third_party/WebKit/Source/core/css/CSSFontFaceSource.h#65
[2]: https://chromium.googlesource.com/chromium/src/+/8839774eace3a4b0427c531d6f3ce8a2bfe6552a/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h#85
 

Comment 2 by tzik@chromium.org, May 17 2016

Status: Fixed (was: Available)

Sign in to add a comment