Damjan Jovanovic : libwine: Fix a regression in the return value check for mmap() on FreeBSD.
Alexandre Julliard
julliard at winehq.org
Mon May 25 15:44:22 CDT 2020
Module: wine
Branch: master
Commit: e0138c4a6a7a87f1d25badd43e05490e706bc666
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e0138c4a6a7a87f1d25badd43e05490e706bc666
Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date: Sat May 23 11:01:49 2020 +0200
libwine: Fix a regression in the return value check for mmap() on FreeBSD.
This fixes a regression from my previous patch in commit
55ba3648379d90642f174e74809b84130d6d1ddc, which was
checking for mmap() returning NULL instead of MAP_FAILED.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49225
Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
libs/wine/mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
index 0fbe2efea7..af91b3e352 100644
--- a/libs/wine/mmap.c
+++ b/libs/wine/mmap.c
@@ -215,7 +215,7 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
/* If available, this will attempt a fixed mapping in-kernel */
flags |= MAP_TRYFIXED;
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- if ( start && mmap( start, size, prot, flags | MAP_FIXED | MAP_EXCL, get_fdzero(), 0 ) )
+ if ( start && mmap( start, size, prot, flags | MAP_FIXED | MAP_EXCL, get_fdzero(), 0 ) != MAP_FAILED )
return start;
#elif defined(__svr4__) || defined(__NetBSD__) || defined(__APPLE__)
if ( try_mmap_fixed( start, size, prot, flags, get_fdzero(), 0 ) )
More information about the wine-cvs
mailing list