From 4b61211e6d02088d11274bbec7090501ff0cba63 Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Sat, 28 Apr 2007 04:10:19 +0000 Subject: [PATCH] - Do not write beyond the buffer. svn path=/trunk/; revision=26553 --- reactos/dll/win32/setupapi/devinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/setupapi/devinst.c b/reactos/dll/win32/setupapi/devinst.c index f1476ca3934..c33ceb0734f 100644 --- a/reactos/dll/win32/setupapi/devinst.c +++ b/reactos/dll/win32/setupapi/devinst.c @@ -188,7 +188,7 @@ SetupDiCreateDeviceInfoListExW( 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(