From 478b4cdce5c584c294d38f84a0131f239d9af88f Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Thu, 20 Nov 2025 03:00:16 +0800 Subject: Fix use after free in render object. --- include/cru/base/StringUtil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/cru/base/StringUtil.h') diff --git a/include/cru/base/StringUtil.h b/include/cru/base/StringUtil.h index 7748f0d3..dbc748d7 100644 --- a/include/cru/base/StringUtil.h +++ b/include/cru/base/StringUtil.h @@ -240,7 +240,7 @@ CodePoint CRU_BASE_API Utf8NextCodePoint(const Utf8CodeUnit* ptr, Index size, inline CodePoint Utf8NextCodePoint(Utf8StringView str, Index current, Index* next_position) { - return Utf8NextCodePoint(str.data(), str.size(), next_position); + return Utf8NextCodePoint(str.data(), str.size(), current, next_position); } CodePoint CRU_BASE_API Utf8PreviousCodePoint(const Utf8CodeUnit* ptr, @@ -249,7 +249,7 @@ CodePoint CRU_BASE_API Utf8PreviousCodePoint(const Utf8CodeUnit* ptr, inline CodePoint Utf8PreviousCodePoint(Utf8StringView str, Index current, Index* next_position) { - return Utf8PreviousCodePoint(str.data(), str.size(), next_position); + return Utf8PreviousCodePoint(str.data(), str.size(), current, next_position); } namespace details { -- cgit v1.2.3