amstradnc: fix bug where you could issue gfx ioctls from any tty!
authorAlan Cox <alan@linux.intel.com>
Fri, 11 May 2018 22:39:55 +0000 (23:39 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 11 May 2018 22:39:55 +0000 (23:39 +0100)
Kernel/platform-amstradnc/devgfx.c

index 8514d36..eb92880 100644 (file)
@@ -38,7 +38,7 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr)
 {
   uint8_t *tmp;
   uint16_t l;
-  if (arg >> 8 != 0x03)
+  if (minor != 1 || (arg >> 8 != 0x03))
     return vt_ioctl(minor, arg, ptr);
 
   switch(arg) {