diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2019-01-08 15:00:03 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2019-01-21 10:36:53 +0100 |
commit | 627f192d1e1a2ddf5fb06201facb15d4c70b058f (patch) | |
tree | 4a18c57f0e8c5b6fd5c4a3b486e5c24d05cc2fd6 /arch/m68k/apollo | |
parent | m68k/defconfig: Update defconfigs for v5.0-rc1 (diff) | |
download | linux-627f192d1e1a2ddf5fb06201facb15d4c70b058f.tar.xz linux-627f192d1e1a2ddf5fb06201facb15d4c70b058f.zip |
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>
Diffstat (limited to 'arch/m68k/apollo')
0 files changed, 0 insertions, 0 deletions