Zebediah Figura : ndis.sys/tests: Test passing a bogus OID to IOCTL_NDIS_QUERY_GLOBAL_STATS.

Alexandre Julliard julliard at winehq.org
Thu Sep 23 15:35:03 CDT 2021


Module: wine
Branch: master
Commit: ef18fb9a3b4dcb4017a623e02ad6317fbffd030b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ef18fb9a3b4dcb4017a623e02ad6317fbffd030b

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Wed Sep 22 23:00:37 2021 -0500

ndis.sys/tests: Test passing a bogus OID to IOCTL_NDIS_QUERY_GLOBAL_STATS.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ndis.sys/tests/ndis.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/ndis.sys/tests/ndis.c b/dlls/ndis.sys/tests/ndis.c
index d6a2db0fd9d..caece671476 100644
--- a/dlls/ndis.sys/tests/ndis.c
+++ b/dlls/ndis.sys/tests/ndis.c
@@ -58,6 +58,15 @@ static void test_device(const WCHAR *service_name, const MIB_IF_ROW2 *row)
         return;
     }
 
+    oid = 0xdeadbeef;
+    iosb.Status = 0xdeadbeef;
+    iosb.Information = 0xdeadbeef;
+    status = NtDeviceIoControlFile( netdev, NULL, NULL, NULL, &iosb,
+            IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid), &medium, sizeof(medium) );
+    todo_wine ok(status == STATUS_INVALID_PARAMETER, "got status %#x\n", status);
+    ok(iosb.Status == 0xdeadbeef, "got %#x\n", iosb.Status);
+    ok(iosb.Information == 0xdeadbeef, "got size %#Ix\n", iosb.Information);
+
     oid = OID_GEN_MEDIA_SUPPORTED;
     ret = DeviceIoControl( netdev, IOCTL_NDIS_QUERY_GLOBAL_STATS,
             &oid, sizeof(oid), &medium, sizeof(medium), &size, NULL );




More information about the wine-cvs mailing list