lineage_android_kernel_xiao.../net/tipc
Guoqing Jiang 5acc58cd99 tipc: use destination length for copy string
commit 29e270fc32192e7729057963ae7120663856c93e upstream.

Got below warning with gcc 8.2 compiler.

net/tipc/topsrv.c: In function ‘tipc_topsrv_start’:
net/tipc/topsrv.c:660:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  strncpy(srv->name, name, strlen(name) + 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/tipc/topsrv.c:660:27: note: length computed here
  strncpy(srv->name, name, strlen(name) + 1);
                           ^~~~~~~~~~~~
So change it to correct length and use strscpy.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-08 13:05:09 +01:00
..
Kconfig
Makefile
addr.c
addr.h
bcast.c tipc: fix broadcast link synchronization problem 2016-10-29 17:21:09 -04:00
bcast.h tipc: fix broadcast link synchronization problem 2016-10-29 17:21:09 -04:00
bearer.c tipc: error path leak fixes in tipc_enable_bearer() 2018-03-03 10:23:24 +01:00
bearer.h tipc: check minimum bearer MTU 2016-12-02 14:03:20 -05:00
core.c
core.h
discover.c tipc: allocate user memory with GFP_KERNEL flag 2017-07-05 14:40:27 +02:00
discover.h
eth_media.c
ib_media.c
link.c tipc: allocate user memory with GFP_KERNEL flag 2017-07-05 14:40:27 +02:00
link.h
monitor.c tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path 2018-03-03 10:23:24 +01:00
monitor.h
msg.c tipc: use only positive error codes in messages 2017-10-12 11:51:23 +02:00
msg.h tipc: allocate user memory with GFP_KERNEL flag 2017-07-05 14:40:27 +02:00
name_distr.c tipc: allocate user memory with GFP_KERNEL flag 2017-07-05 14:40:27 +02:00
name_distr.h
name_table.c
name_table.h
net.c tipc: Fix tipc_sk_reinit race conditions 2017-06-17 06:41:49 +02:00
net.h
netlink.c tipc: add policy for TIPC_NLA_NET_ADDR 2018-04-29 11:32:01 +02:00
netlink.h
netlink_compat.c tipc: fix use-after-free 2017-08-30 10:21:41 +02:00
node.c tipc: check return value of nlmsg_new 2018-03-24 11:00:14 +01:00
node.h
server.c tipc: fix memory leak in tipc_accept_from_sock() 2017-12-16 16:25:45 +01:00
server.h
socket.c tipc: Fix tipc_sk_reinit handling of -EAGAIN 2018-11-10 07:42:46 -08:00
socket.h
subscr.c tipc: use destination length for copy string 2018-12-08 13:05:09 +01:00
subscr.h tipc: add subscription refcount to avoid invalid delete 2017-06-17 06:41:57 +02:00
sysctl.c
udp_media.c tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv() 2017-12-16 16:25:46 +01:00
udp_media.h