Files
linux/drivers
Andy Shevchenko 21f585480d fbtft: Make sure string is NULL terminated
New GCC warns about inappropriate use of strncpy():

drivers/staging/fbtft/fbtft-core.c: In function ‘fbtft_framebuffer_alloc’:
drivers/staging/fbtft/fbtft-core.c:665:2: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
  665 |  strncpy(info->fix.id, dev->driver->name, 16);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Later on the copy is being used with the assumption to be NULL terminated.
Make sure string is NULL terminated by switching to snprintf().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20191120095716.26628-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20 14:35:57 +01:00
..
2019-11-11 06:23:37 +01:00
2019-08-27 09:43:59 +02:00
2019-11-06 21:48:29 -08:00
2019-09-23 17:20:40 -04:00
2019-10-15 23:51:36 +02:00
2019-11-11 06:23:37 +01:00
2019-10-22 17:55:51 +02:00
2019-10-26 19:47:31 +08:00
2019-10-15 14:07:01 -06:00