On Fri, 25 Sep 2026 21:53:52 GMT, Phil Race <[email protected]> wrote:

> Add some missing 'up front' checks for GlyphVector access indices that are 
> out of bounds.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/java.desktop/share/classes/sun/font/StandardGlyphVector.java line 433:

> 431:     // relative to gv origin
> 432:     public Shape getGlyphOutline(int ix) {
> 433:         if (ix < 0 || ix > glyphs.length) {

per the spec in the parent class it should be ">="?
>     * @throws IndexOutOfBoundsException if {@code glyphIndex}
>     *   is less than 0 or greater than or equal to the number
>     *   of glyphs in this {@code GlyphVector}

test/jdk/java/awt/font/GlyphVector/GlyphVectorIOBE.java line 36:

> 34: public class GlyphVectorIOBE {
> 35: 
> 36:    static Font font = new Font(Font.DIALOG, Font.PLAIN, 12);

The test uses suspicion 3-char indentation?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33078#discussion_r4130489384
PR Review Comment: https://git.openjdk.org/jdk/pull/33078#discussion_r4130506810

Reply via email to