RFR: 8189092: ArrayIndexOutOfBoundsException on Linux in getCachedGlyph
Laurent Bourg=?utf-8?b?w6g=?=s
github.com+5607073+bourgesl at openjdk.org
Sat Oct 26 11:33:15 UTC 2019
On Fri, 25 Oct 2019 20:18:48 GMT, Phil Race <prr at openjdk.org> wrote:
> I have added an evaluation in https://bugs.openjdk.java.net/browse/JDK-8207839
> Please read that for more detail, but basically we are not properly preventing or
> handling cases where fontconfig causes us to overflow the byte storage used
> for a font "slot".
>
> ----------------
>
> Commits:
> - b6c19466: Fix whitespace
> - e00ef992: 8189092: ArrayIndexOutOfBoundsException on Linux in getCachedGlyph
>
> Changes: https://git.openjdk.java.net/jfx/pull/24/files
> Webrev: https://webrevs.openjdk.java.net/jfx/24/webrev.00
> Issue: https://bugs.openjdk.java.net/browse/JDK-8189092
> Stats: 15 lines in 3 files changed: 12 ins; 0 del; 3 mod
> Patch: https://git.openjdk.java.net/jfx/pull/24.diff
> Fetch: git fetch https://git.openjdk.java.net/jfx pull/24/head:pull/24
I had a quick look by curiosity as it is not my field. Explanations really make sense, thanks Phil.
Bit masks & shifts look good and definitely it will make that code safer.
However I wonder how to deal with more than 255 fonts (1 byte limit) as it may happen on some systems, even not reallistic.
Thanks
PR: https://git.openjdk.java.net/jfx/pull/24
More information about the openjfx-dev
mailing list