提交 3e0650a9 编写于 作者: R Richard Henderson 提交者: Aurelien Jarno

Fix zero-length write(2).

Signed-off-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 c581deda
......@@ -2429,6 +2429,9 @@ int page_check_range(target_ulong start, target_ulong len, int flags)
assert(start < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
#endif
if (len == 0) {
return 0;
}
if (start + len - 1 < start) {
/* We've wrapped around. */
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册