ip_tunnel: Fix name string concatenate in __ip_tunnel_create() 50/220150/3
authorSultan Alsawaf <sultanxda@gmail.com>
Wed, 6 Jun 2018 22:56:54 +0000 (15:56 -0700)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 16 Dec 2019 01:32:07 +0000 (10:32 +0900)
commit936f8f10b619626dae1961d7fffa60a1788d16aa
tree8acd33f1b73932b8da2d96df090169342855f218
parenta3e9d6a9501a27989eb7151c6fc955fb73475fea
ip_tunnel: Fix name string concatenate in __ip_tunnel_create()

By passing a limit of 2 bytes to strncat, strncat is limited to writing
fewer bytes than what it's supposed to append to the name here.

Since the bounds are checked on the line above this, just remove the string
bounds checks entirely since they're unneeded.

Signed-off-by: Sultan Alsawaf <sultanxda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[sw0312.kim: cherry-pick mainline commit 000ade80164 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Iea412bf5398b91fcdc471952a289d406ea26d677
net/ipv4/ip_tunnel.c