代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/qemu 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From e6b133311a7a5a618b48c6f38e3c3bb9e9a395c9 Mon Sep 17 00:00:00 2001
From: eillon <yezhenyu2@huawei.com>
Date: Mon, 14 Feb 2022 15:35:28 +0800
Subject: [PATCH] seabios: add check to avoid dereference NULL pointer
alloc_find_lowest() may return NULL, check it.
Signed-off-by: eillon <yezhenyu2@huawei.com>
---
roms/seabios/src/malloc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/roms/seabios/src/malloc.c b/roms/seabios/src/malloc.c
index 5827a6523..99fa3b7e0 100644
--- a/roms/seabios/src/malloc.c
+++ b/roms/seabios/src/malloc.c
@@ -544,10 +544,12 @@ malloc_prepboot(void)
// Clear unused f-seg ram.
struct allocinfo_s *info = alloc_find_lowest(&ZoneFSeg);
- u32 size = info->range_end - info->range_start;
- memset(memremap(info->range_start, size), 0, size);
- dprintf(1, "Space available for UMB: %x-%x, %x-%x\n"
- , RomEnd, base, info->range_start, info->range_end);
+ if (info) {
+ u32 size = info->range_end - info->range_start;
+ memset(memremap(info->range_start, size), 0, size);
+ dprintf(1, "Space available for UMB: %x-%x, %x-%x\n"
+ , RomEnd, base, info->range_start, info->range_end);
+ }
// We should not give back unused high ram, to support some special
// guest OS, like oracle linux series.
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。