Author: dgorbachev
Date: Sat Apr 28 08:10:19 2007
New Revision: 26553
URL:
http://svn.reactos.org/svn/reactos?rev=26553&view=rev
Log:
- Do not write beyond the buffer.
Modified:
trunk/reactos/dll/win32/setupapi/devinst.c
Modified: trunk/reactos/dll/win32/setupapi/devinst.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/devinst.c (original)
+++ trunk/reactos/dll/win32/setupapi/devinst.c Sat Apr 28 08:10:19 2007
@@ -188,7 +188,7 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto cleanup;
}
- ZeroMemory(list, sizeof(struct DeviceInfoSet));
+ ZeroMemory(list, FIELD_OFFSET(struct DeviceInfoSet, szData));
list->magic = SETUP_DEV_INFO_SET_MAGIC;
memcpy(