summaryrefslogtreecommitdiff
path: root/init/noinitramfs.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-14 15:07:00 +0300
committerDavid S. Miller <davem@davemloft.net>2017-07-14 19:03:11 +0300
commit45e0b4b3d532ea67bf90701e6162f31855ab3c98 (patch)
tree85da8999049f37a741675a8db29c38bb6fd4d29f /init/noinitramfs.c
parentc98b0537f0d962b46c62c27b6c2d783257f7400f (diff)
downloadlinux-45e0b4b3d532ea67bf90701e6162f31855ab3c98.tar.xz
isdn: divert: fix sprintf buffer overflow warning
One string we pass into the cs->info buffer might be too long, as pointed out by gcc: drivers/isdn/divert/isdn_divert.c: In function 'll_callback': drivers/isdn/divert/isdn_divert.c:488:22: error: '%d' directive writing between 1 and 3 bytes into a region of size between 1 and 69 [-Werror=format-overflow=] sprintf(cs->info, "%d 0x%lx %s %s %s %s 0x%x 0x%x %d %d %s\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/isdn/divert/isdn_divert.c:488:22: note: directive argument in the range [0, 255] drivers/isdn/divert/isdn_divert.c:488:4: note: 'sprintf' output 25 or more bytes (assuming 129) into a destination of size 90 This is unlikely to actually cause problems, so let's use snprintf as a simple workaround to shut up the warning and truncate the buffer instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'init/noinitramfs.c')
0 files changed, 0 insertions, 0 deletions