diff options
| author | tannerlove <tannerlove@google.com> | 2020-06-08 15:37:15 -0400 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2020-06-29 20:07:54 -0400 |
| commit | 7f5c8bd3a29a8a5773f733adb4f45168ac50e42d (patch) | |
| tree | 927555c71f5f124a61d688a1c89b6295bbf9fab8 /include/linux/workqueue.h | |
| parent | 7e5c47b8f4e5632f1c0129717dd2251335aa342b (diff) | |
selftests/net: in timestamping, strncpy needs to preserve null byte
[ Upstream commit 8027bc0307ce59759b90679fa5d8b22949586d20 ]
If user passed an interface option longer than 15 characters, then
device.ifr_name and hwtstamp.ifr_name became non-null-terminated
strings. The compiler warned about this:
timestamping.c:353:2: warning: ‘strncpy’ specified bound 16 equals \
destination size [-Wstringop-truncation]
353 | strncpy(device.ifr_name, interface, sizeof(device.ifr_name));
Fixes: cb9eff097831 ("net: new user space API for time stamping of incoming and outgoing packets")
Signed-off-by: Tanner Love <tannerlove@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions
