!1234 mem 漏洞修复

Merge pull request !1234 from hw_llm/cherry-pick-1727599316
This commit is contained in:
openharmony_ci 2024-09-29 11:50:43 +00:00 committed by Gitee
commit 572022f542
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;
}