[WIN32K] add missing parameter check in NtGdiArcInternal
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 11 Sep 2016 09:01:04 +0000 (09:01 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 11 Sep 2016 09:01:04 +0000 (09:01 +0000)
svn path=/trunk/; revision=72653

reactos/win32ss/gdi/ntgdi/arc.c

index 16e63e5..c60fadf 100644 (file)
@@ -376,6 +376,12 @@ NtGdiArcInternal(
     /* Yes, Windows really returns TRUE in this case */
     return TRUE;
   }
+  if (arctype > GdiTypePie)
+  {
+    DC_UnlockDc(dc);
+    EngSetLastError(ERROR_INVALID_PARAMETER);
+    return FALSE;
+  }
 
   DC_vPrepareDCsForBlit(dc, NULL, NULL, NULL);