diff --git a/patch/backport-openharmony-adapt.patch b/patch/backport-openharmony-adapt.patch index e4f9e1abf37887e70f70ac3fdaf58c503cfc7cc9..2f687d8ae79ea0f991fb5c41bcbbebff5d01c74d 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);