Skip to content

Commit 060fdb1

Browse files
authored
Merge pull request ibmruntimes#425 from pshipton/cairo
Apply the patch for CVE-2024-56732
2 parents 9694206 + f148d46 commit 060fdb1

File tree

1 file changed

+4
-2
lines changed
  • src/java.desktop/share/native/libharfbuzz

1 file changed

+4
-2
lines changed

src/java.desktop/share/native/libharfbuzz/hb-utf.hh

+4-2
Original file line numberDiff line numberDiff line change
@@ -458,19 +458,21 @@ struct hb_ascii_t
458458
template <typename utf_t>
459459
static inline const typename utf_t::codepoint_t *
460460
hb_utf_offset_to_pointer (const typename utf_t::codepoint_t *start,
461+
const typename utf_t::codepoint_t *text,
462+
unsigned text_len,
461463
signed offset)
462464
{
463465
hb_codepoint_t unicode;
464466

465467
while (offset-- > 0)
466468
start = utf_t::next (start,
467-
start + utf_t::max_len,
469+
text + text_len,
468470
&unicode,
469471
HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT);
470472

471473
while (offset++ < 0)
472474
start = utf_t::prev (start,
473-
start - utf_t::max_len,
475+
text,
474476
&unicode,
475477
HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT);
476478

0 commit comments

Comments
 (0)