]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/isdn-isdn_tty-fix-build-warning-of-strncpy.patch
drop perf-trace-support-multiple-vfs_getname-probes.patch from 4.4 and 4.9 queues
[thirdparty/kernel/stable-queue.git] / queue-4.4 / isdn-isdn_tty-fix-build-warning-of-strncpy.patch
1 From foo@baz Thu Mar 7 18:06:23 CET 2019
2 Date: Thu, 07 Mar 2019 18:06:23 +0100
3 To: Greg KH <gregkh@linuxfoundation.org>
4 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 Subject: isdn: isdn_tty: fix build warning of strncpy
6
7 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8
9 Not upstream as isdn is long deleted.
10
11 Fix up a strncpy build warning for isdn_tty_suspend() using strscpy.
12
13 It's not like anyone uses this code anyway, and this gets rid of a build
14 warnings so that we can see real warnings as they pop up over time.
15
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18
19 ---
20 drivers/isdn/i4l/isdn_tty.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23 --- a/drivers/isdn/i4l/isdn_tty.c
24 +++ b/drivers/isdn/i4l/isdn_tty.c
25 @@ -786,7 +786,7 @@ isdn_tty_suspend(char *id, modem_info *i
26 cmd.parm.cmsg.para[3] = 4; /* 16 bit 0x0004 Suspend */
27 cmd.parm.cmsg.para[4] = 0;
28 cmd.parm.cmsg.para[5] = l;
29 - strncpy(&cmd.parm.cmsg.para[6], id, l);
30 + strscpy(&cmd.parm.cmsg.para[6], id, l);
31 cmd.command = CAPI_PUT_MESSAGE;
32 cmd.driver = info->isdn_driver;
33 cmd.arg = info->isdn_channel;