提交 77846800 编写于 作者: I Ilya Matveychikov 提交者: Rich Felker

fix the use of syscall result in dl_mmap

上级 e8e780af
......@@ -920,7 +920,7 @@ static void *dl_mmap(size_t n)
#else
p = (void *)__syscall(SYS_mmap, 0, n, prot, flags, -1, 0);
#endif
return p == MAP_FAILED ? 0 : p;
return (unsigned long)p > -4096UL ? 0 : p;
}
static void makefuncdescs(struct dso *p)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册