mirror of
https://github.com/openharmony/third_party_harfbuzz.git
synced 2026-07-01 10:04:31 -04:00
Disallow hb_buffer_set_message_func during callback
Signed-off-by: ZacohZhen <kouzhenrong@h-partners.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
|
||||
index 7fb95fe..ce737ce 100644
|
||||
--- a/src/hb-buffer.cc
|
||||
+++ b/src/hb-buffer.cc
|
||||
@@ -2271,7 +2271,8 @@ hb_buffer_set_message_func (hb_buffer_t *buffer,
|
||||
hb_buffer_message_func_t func,
|
||||
void *user_data, hb_destroy_func_t destroy)
|
||||
{
|
||||
- if (unlikely (hb_object_is_immutable (buffer)))
|
||||
+ if (unlikely (hb_object_is_immutable (buffer)) ||
|
||||
+ unlikely (buffer->message_depth))
|
||||
{
|
||||
if (destroy)
|
||||
destroy (user_data);
|
||||
+4
-2
@@ -33,7 +33,8 @@ def untar_file(tar_file_path, extract_path):
|
||||
def move_file(src_path, dst_path):
|
||||
files = [
|
||||
"huawei_harfbuzz.patch",
|
||||
"CVE-2026-22693.patch"
|
||||
"CVE-2026-22693.patch",
|
||||
"backport-harfbuzz-disallow-during-callback.patch"
|
||||
]
|
||||
for file in files:
|
||||
src_file = os.path.join(src_path, file)
|
||||
@@ -55,7 +56,8 @@ def apply_patch(patch_file, target_dir):
|
||||
def do_patch(target_dir):
|
||||
patch_file = [
|
||||
"huawei_harfbuzz.patch",
|
||||
"CVE-2026-22693.patch"
|
||||
"CVE-2026-22693.patch",
|
||||
"backport-harfbuzz-disallow-during-callback.patch"
|
||||
]
|
||||
|
||||
for patch in patch_file:
|
||||
|
||||
Reference in New Issue
Block a user