From 7d2f5a7b154d547cc5d5e6dd28dcbeae209d9e77 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 4 Jun 2004 01:01:17 +0000 Subject: [PATCH] Avoid zero size allocations. --- libs/wine/mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c index d54250ed891..ba2589f6bf9 100644 --- a/libs/wine/mmap.c +++ b/libs/wine/mmap.c @@ -202,6 +202,8 @@ static void reserve_area( void *addr, void *end ) void *ptr; size_t size = (char *)end - (char *)addr; + if (!size) return; + if ((ptr = wine_anon_mmap( addr, size, PROT_NONE, MAP_NORESERVE )) != (void *)-1) { if (ptr == addr)