[fixup] check NULL pointer before access (#8573)

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell
2024-03-02 16:05:19 +08:00
committed by GitHub
parent 00c6800e4e
commit 53754ff50a
7 changed files with 54 additions and 31 deletions
+1 -1
View File
@@ -1278,7 +1278,7 @@ int rt_aspace_load_page(rt_aspace_t aspace, void *addr, rt_size_t npage)
if (!varea)
{
LOG_W("%s: varea not exist", __func__);
LOG_W("%s: varea not exist(addr=%p)", __func__, addr);
err = -RT_ENOENT;
}
else if ((char *)addr >= end || (rt_size_t)addr & ARCH_PAGE_MASK ||