!1232 mem 漏洞修复

Merge pull request !1232 from hw_llm/master
This commit is contained in:
openharmony_ci 2024-09-29 09:12:37 +00:00 committed by Gitee
commit 88cfb3de9d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ static ssize_t MemMap(struct file *filep, LosVmMapRegion *region)
VADDR_T vaddr = region->range.base;
LosVmSpace *space = LOS_SpaceGet(vaddr);
if ((paddr >= SYS_MEM_BASE) && (paddr < SYS_MEM_END)) {
if (((paddr + size) >= SYS_MEM_BASE) && (paddr < SYS_MEM_END)) {
return -EINVAL;
}