From: Riku Voipio <riku.voi...@nokia.com> fixes running ldconfig under qemu linux-user
Signed-off-by: Riku Voipio <riku.voi...@nokia.com> Cc: Richard Henderson <r...@twiddle.net> Cc: martin.mohr...@opensuse.org --- exec.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/exec.c b/exec.c index 14767b7..c834be2 100644 --- a/exec.c +++ b/exec.c @@ -2409,8 +2409,11 @@ int page_check_range(target_ulong start, target_ulong len, int flags) #if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS assert(start < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS)); #endif + if (len == 0) { + return 0; + } - if (start + len - 1 < start) { + if (start + len < start) { /* We've wrapped around. */ return -1; } -- 1.6.5