From b2fbbbbaea3401f045a3f300d55da1be484bf07e Mon Sep 17 00:00:00 2001 From: hanwenzhao Date: Wed, 9 Oct 2024 20:46:37 +0800 Subject: [PATCH] patch Signed-off-by: hanwenzhao Change-Id: I7403c94eb48643c5e4b9d890df11f43bdbc60f00 --- patch/backport-openharmony-adapt.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patch/backport-openharmony-adapt.patch b/patch/backport-openharmony-adapt.patch index e4f9e1a..2f687d8 100644 --- a/patch/backport-openharmony-adapt.patch +++ b/patch/backport-openharmony-adapt.patch @@ -18043,3 +18043,16 @@ index 0000000..9844954 + +/* Generated data ends here */ + + +diff --git a/glib/garray.c b/glib/garray.c +index 1ab3bee..02d35e7 100644 +--- a/glib/garray.c ++++ b/glib/garray.c +@@ -993,6 +993,7 @@ g_array_maybe_expand (GRealArray *array, + if (want_len > array->elt_capacity) + { + gsize want_alloc = g_nearest_pow (g_array_elt_len (array, want_len)); ++ g_assert (want_alloc >= g_array_elt_len (array, want_len)); + want_alloc = MAX (want_alloc, MIN_ARRAY_SIZE); + + array->data = g_realloc (array->data, want_alloc); -- Gitee