summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-02 11:43:54 +0200
committerThomas Haller <thaller@redhat.com>2019-08-02 11:47:06 +0200
commit23fa1b3272f5af3520c619f2d4101dcc2fbbf914 (patch)
treeedcc63c32cb008812fb6e49628b26847c9c64315
parent9f4302e1320081088d29db1f98c39fc4545267e3 (diff)
downloadNetworkManager-23fa1b3272f5af3520c619f2d4101dcc2fbbf914.tar.gz
adsl: avoid coverity false-positive when using strcpy() for interface name
CID 59391 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW) 31. fixed_size_dest: You might overrun the 16-character fixed-size string be.ifspec.spec.ifname by copying priv->nas_ifname without checking the length.
-rw-r--r--src/devices/adsl/nm-device-adsl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c
index 536d7cccb7..34efdb0156 100644
--- a/src/devices/adsl/nm-device-adsl.c
+++ b/src/devices/adsl/nm-device-adsl.c
@@ -207,7 +207,7 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl)
memset (&be, 0, sizeof (be));
be.backend_num = ATM_BACKEND_BR2684;
be.ifspec.method = BR2684_FIND_BYIFNAME;
- strcpy (be.ifspec.spec.ifname, priv->nas_ifname);
+ nm_utils_ifname_cpy (be.ifspec.spec.ifname, priv->nas_ifname);
be.fcs_in = BR2684_FCSIN_NO;
be.fcs_out = BR2684_FCSOUT_NO;
be.encaps = is_llc ? BR2684_ENCAPS_LLC : BR2684_ENCAPS_VC;