代码拉取完成,页面将自动刷新
From ad58277b71415b714009bee33f04e8c18c7ab44d Mon Sep 17 00:00:00 2001
From: Andrey Prokopyuk <andrey.prokopyuk@gmail.com>
Date: Fri, 1 Nov 2024 14:02:41 +0300
Subject: [PATCH] Fix FcSerialize null pointer usage
---
src/fcserialize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fcserialize.c b/src/fcserialize.c
index 2388dcd8..18c96930 100644
--- a/src/fcserialize.c
+++ b/src/fcserialize.c
@@ -163,7 +163,7 @@ FcSerializeResize (FcSerialize *serialize, size_t new_count)
size_t old_used = serialize->buckets_used;
size_t old_count = serialize->buckets_count;
FcSerializeBucket *old_buckets = serialize->buckets;
- FcSerializeBucket *old_buckets_end = old_buckets + old_count;
+ FcSerializeBucket *old_buckets_end = old_buckets ? old_buckets + old_count : NULL;
FcSerializeBucket *new_buckets = malloc (new_count * sizeof (*old_buckets));
if (!new_buckets)
--
GitLab
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。