Skip to content
Snippets Groups Projects
Commit 85cbe821 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard
Browse files

DD_STRUCT_COPY_BYSIZE: Do not clear more that struct size.

parent 69cf835c
Branches
Tags
No related merge requests found
......@@ -45,7 +45,10 @@
do { \
DWORD __size = (to)->dwSize; \
DWORD __copysize = __size; \
memset(to,0,__size); \
DWORD __resetsize = __size; \
if (__resetsize > sizeof(*to)) \
__resetsize = sizeof(*to); \
memset(to,0,__resetsize); \
if ((from)->dwSize < __size) \
__copysize = (from)->dwSize; \
memcpy(to,from,__copysize); \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment