https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3b4f09eb3610865e21f0e...
commit d3b4f09eb3610865e21f0e6f78eb9dea69adc695 Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Sat Oct 7 12:11:17 2017 +0200
[KERNEL32_APITEST]: Fix uninit stack var usage --- modules/rostests/apitests/kernel32/DeviceIoControl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/rostests/apitests/kernel32/DeviceIoControl.c b/modules/rostests/apitests/kernel32/DeviceIoControl.c index ed1c6f7fa3..2f993eb25e 100644 --- a/modules/rostests/apitests/kernel32/DeviceIoControl.c +++ b/modules/rostests/apitests/kernel32/DeviceIoControl.c @@ -62,11 +62,12 @@ QueryDeviceName(VOID) DWORD Size, Error; MOUNTDEV_NAME MDN, *AllocatedMDN;
+ Size = 0; Ret = DeviceIoControl(Device, IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, NULL, 0, &MDN, sizeof(MDN) - 1, &Size, NULL); ok(Ret == 0, "DeviceIoControl succeed\n"); Error = GetLastError(); ok(Error == ERROR_INVALID_PARAMETER, "Expecting ERROR_INVALID_PARAMETER, got %ld\n", Error); - ok(Size == 40 /* ?! */, "Invalid output size: %ld\n", Size); + ok(Size == 0, "Invalid output size: %ld\n", Size);
Ret = DeviceIoControl(Device, IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, NULL, 0, &MDN, sizeof(MDN), &Size, NULL); ok(Ret == 0, "DeviceIoControl succeed\n"); @@ -119,11 +120,12 @@ QueryUniqueId(VOID) DWORD Size, Error; MOUNTDEV_UNIQUE_ID MUI, *AllocatedMUI;
+ Size = 0; Ret = DeviceIoControl(Device, IOCTL_MOUNTDEV_QUERY_UNIQUE_ID, NULL, 0, &MUI, sizeof(MUI) - 1, &Size, NULL); ok(Ret == 0, "DeviceIoControl succeed\n"); Error = GetLastError(); ok(Error == ERROR_INVALID_PARAMETER, "Expecting ERROR_INVALID_PARAMETER, got %ld\n", Error); - ok(Size == 48 /* ?! */, "Invalid output size: %ld\n", Size); + ok(Size == 0, "Invalid output size: %ld\n", Size);
Ret = DeviceIoControl(Device, IOCTL_MOUNTDEV_QUERY_UNIQUE_ID, NULL, 0, &MUI, sizeof(MUI), &Size, NULL); ok(Ret == 0, "DeviceIoControl succeed\n");