mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
libsocket: Make sure ifr.ifr_name is null-terminated
Found by Coverity Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Dec 3 03:40:53 CET 2016 on sn-devel-144
This commit is contained in:
parent
20b7e08c07
commit
383530c164
@ -146,7 +146,7 @@ static void query_iface_speed_from_name(const char *name, uint64_t *speed)
|
||||
}
|
||||
|
||||
ZERO_STRUCT(ifr);
|
||||
strncpy(ifr.ifr_name, name, IF_NAMESIZE);
|
||||
strlcpy(ifr.ifr_name, name, IF_NAMESIZE);
|
||||
|
||||
ifr.ifr_data = (void *)&edata;
|
||||
edata.cmd = ETHTOOL_GLINK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user