[WINESYNC] msvcrt: Don't fail when _aligned_offset_malloc is used with size=0.
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 10 Jan 2023 09:50:18 +0000 (11:50 +0200)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 24 Jan 2023 17:53:13 +0000 (18:53 +0100)
wine commit id 7771552f247660acc472b4862f32c4f8426be180 by Piotr Caban <piotr@codeweavers.com>

sdk/lib/crt/wine/heap.c

index 6a49988..8fc3f6c 100644 (file)
@@ -545,7 +545,7 @@ void * CDECL _aligned_offset_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment,
     }
 
     /* offset must be less than size */
-    if (offset >= size)
+    if (offset && offset >= size)
     {
         *MSVCRT__errno() = MSVCRT_EINVAL;
         return NULL;