]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commitdiff
An ioctl should fail on any invalid argument
authorBen Chalmers <Ben.Chalmers@citrix.com>
Thu, 7 Jul 2016 13:44:35 +0000 (14:44 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 11 Jul 2016 13:20:14 +0000 (14:20 +0100)
Previously failures happened only if all arguments
were invalid, leading to bugchecks if both InLen
and OutLen were 0

Signed-off-by: Ben.Chalmers@citrix.com
src/xeniface/ioctl_gnttab.c

index a692f2961c08faa456868400d1a2820621ecab29..02e9231604d96dcdd9404c4e504939a955cbf2e2 100644 (file)
@@ -712,7 +712,7 @@ IoctlGnttabUnmapForeignPages(
     PXENIFACE_CONTEXT_ID ContextId;
 
     status = STATUS_INVALID_BUFFER_SIZE;
-    if (InLen != sizeof(XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN) &&
+    if (InLen != sizeof(XENIFACE_GNTTAB_UNMAP_FOREIGN_PAGES_IN) ||
         OutLen != 0) {
         goto fail1;
     }