diff options
author | Kees Cook <keescook@chromium.org> | 2021-06-02 13:27:41 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-03 14:15:10 -0700 |
commit | 9c153d3889767eb347a9b1719cc6f336faccdba9 (patch) | |
tree | 4e7f748d0dfcf0dde63765b6a3e4b38ef9d922a0 /net/8021q/vlan.h | |
parent | 5ff5622ea1f16d535f1be4e478e712ef48fe183b (diff) | |
download | linux-rpi-9c153d3889767eb347a9b1719cc6f336faccdba9.tar.gz linux-rpi-9c153d3889767eb347a9b1719cc6f336faccdba9.tar.bz2 linux-rpi-9c153d3889767eb347a9b1719cc6f336faccdba9.zip |
net: vlan: Avoid using strncpy()
Use strscpy_pad() instead of strncpy() which is considered deprecated:
https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan.h')
-rw-r--r-- | net/8021q/vlan.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index fa3ad3d4d58c..e3f6ff05a528 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h @@ -129,7 +129,8 @@ void vlan_dev_set_ingress_priority(const struct net_device *dev, int vlan_dev_set_egress_priority(const struct net_device *dev, u32 skb_prio, u16 vlan_prio); int vlan_dev_change_flags(const struct net_device *dev, u32 flag, u32 mask); -void vlan_dev_get_realdev_name(const struct net_device *dev, char *result); +void vlan_dev_get_realdev_name(const struct net_device *dev, char *result, + size_t size); int vlan_check_real_dev(struct net_device *real_dev, __be16 protocol, u16 vlan_id, |