linux-sg2042/drivers/dio
Geert Uytterhoeven 627f192d1e dio: Fix buffer overflow in case of unknown board
With gcc 8.2.0:

    drivers/dio/dio.c: In function ‘dio_init’:
    drivers/dio/dio.c:240:17: warning: ‘strcpy’ writing 69 or more bytes into a region of size 64 overflows the destination [-Wstringop-overflow=]
		     strcpy(dev->name,dio_getname(dev->id));
		     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Indeed, if an unknown board is present, the target buffer will overflow.
Shorten the unknown board name string to fix this, and declare it as an
array while at it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2019-01-21 10:36:53 +01:00
..
Makefile
dio-driver.c m68k: don't export static inline functions 2009-12-06 11:18:28 +01:00
dio-sysfs.c m68k: dio - Kill resource_size_t format warnings 2009-01-12 20:56:42 +01:00
dio.c dio: Fix buffer overflow in case of unknown board 2019-01-21 10:36:53 +01:00