summaryrefslogtreecommitdiffstats
path: root/commands/mw.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-05-22 15:26:44 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-05-23 10:11:53 +0200
commit6a8fee6c4eaec4f2575ce59b1b78eafd144633e2 (patch)
tree86c6580c74ad2605861ee013a5d04213df30cef8 /commands/mw.c
parent0d4a43951b1a19d87f323deabd08adc667b2f71f (diff)
downloadbarebox-6a8fee6c4eaec4f2575ce59b1b78eafd144633e2.tar.gz
scripts/mkimage: Fix strncpy usage
Original code produces the following warning when compiled with GCC8: HOSTCC scripts/mkimage In function ‘image_set_name’, inlined from ‘main’ at scripts/mkimage.c:614:2: scripts/mkimage.c:153:2: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] strncpy(image_get_name(hdr), name, IH_NMLEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ reduce specified bound by one to make sure that NULL-terminator is never overwritten. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/mw.c')
0 files changed, 0 insertions, 0 deletions