Please review this simple patch. When running idea on jdk17 with asan I have found this buffer overflow. The code checks the cache for at least one free element, while placing 6 elements to the cache. The fix checks the presence of 6 free elements.
------------- Commit messages: - 8289697: buffer overflow in MTLVertexCache.m: MTLVertexCache_AddGlyphQuad Changes: https://git.openjdk.org/jdk/pull/9368/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9368&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8289697 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9368.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9368/head:pull/9368 PR: https://git.openjdk.org/jdk/pull/9368