Piotr Caban : msvcrt: Don' t fail when _aligned_offset_malloc is used with size=0.
Alexandre Julliard
julliard at winehq.org
Wed Dec 19 14:01:09 CST 2012
Module: wine
Branch: master
Commit: 7771552f247660acc472b4862f32c4f8426be180
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7771552f247660acc472b4862f32c4f8426be180
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Dec 19 10:16:45 2012 +0100
msvcrt: Don't fail when _aligned_offset_malloc is used with size=0.
---
dlls/msvcrt/heap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c
index 0a0d819..e8c3765 100644
--- a/dlls/msvcrt/heap.c
+++ b/dlls/msvcrt/heap.c
@@ -384,7 +384,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;
More information about the wine-cvs
mailing list