diff options
author | Richard Henderson <rth@twiddle.net> | 2010-03-29 10:54:42 -0700 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-05-06 06:45:12 +0200 |
commit | 3e0650a9c95f343ca5da2b89dc4ad1cd67c2c2d7 (patch) | |
tree | 23b9c6ee30d90b9c70c2e881f8db0cf0378599e7 | |
parent | c581deda322080e8beb88b2e468d4af54454e4b3 (diff) |
Fix zero-length write(2).
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r-- | exec.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |