https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f34e425e1a2be61db3983a452a39bb0a69f24485

commit f34e425e1a2be61db3983a452a39bb0a69f24485
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Tue Jan 10 11:50:18 2023 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Tue Jan 24 18:53:13 2023 +0100

    [WINESYNC] msvcrt: Don't fail when _aligned_offset_malloc is used with 
size=0.
    
    wine commit id 7771552f247660acc472b4862f32c4f8426be180 by Piotr Caban 
<[email protected]>
---
 sdk/lib/crt/wine/heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdk/lib/crt/wine/heap.c b/sdk/lib/crt/wine/heap.c
index 6a49988c63b..8fc3f6c37f1 100644
--- a/sdk/lib/crt/wine/heap.c
+++ b/sdk/lib/crt/wine/heap.c
@@ -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;

Reply via email to