Searched hist:"36 f18439ea16ebb670720602bfbf47c95a6691d4" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/net/ |
H A D | macvlan.c | diff 36f18439ea16ebb670720602bfbf47c95a6691d4 Mon May 27 20:38:55 CEST 2019 Gustavo A. R. Silva <gustavo@embeddedor.com> macvlan: Replace strncpy() by strscpy()
The strncpy() function is being deprecated. Replace it by the safer strscpy() and fix the following Coverity warning:
"Calling strncpy with a maximum size argument of 16 bytes on destination array ifrr.ifr_ifrn.ifrn_name of size 16 bytes might leave the destination string unterminated."
Notice that, unlike strncpy(), strscpy() always null-terminates the destination string.
Addresses-Coverity-ID: 1445537 ("Buffer not null terminated") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|