提交 133e9801 编写于 作者: O openharmony_ci 提交者: Gitee

!171 xmmap 使用空文件映射时存在崩溃的情况

Merge pull request !171 from 刘挺松/master
......@@ -22,6 +22,10 @@ void *__mmap(void *start, size_t len, int prot, int flags, int fd, off_t off)
errno = ENOMEM;
return MAP_FAILED;
}
if (len == 0) {
errno = EINVAL;
return MAP_FAILED;
}
if (flags & MAP_FIXED) {
__vm_wait();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册