Skip to content

Commit

Permalink
Merge pull request #425 from pshipton/cairo
Browse files Browse the repository at this point in the history
Apply the patch for CVE-2024-56732
  • Loading branch information
keithc-ca authored Jan 2, 2025
2 parents 9694206 + f148d46 commit 060fdb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/java.desktop/share/native/libharfbuzz/hb-utf.hh
Original file line number Diff line number Diff line change
Expand Up @@ -458,19 +458,21 @@ struct hb_ascii_t
template <typename utf_t>
static inline const typename utf_t::codepoint_t *
hb_utf_offset_to_pointer (const typename utf_t::codepoint_t *start,
const typename utf_t::codepoint_t *text,
unsigned text_len,
signed offset)
{
hb_codepoint_t unicode;

while (offset-- > 0)
start = utf_t::next (start,
start + utf_t::max_len,
text + text_len,
&unicode,
HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT);

while (offset++ < 0)
start = utf_t::prev (start,
start - utf_t::max_len,
text,
&unicode,
HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT);

Expand Down

0 comments on commit 060fdb1

Please sign in to comment.