summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2018-09-03 06:15:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-10 09:53:21 +0300
commit7a0ee61df2d4fffcb5e798ab009d60c7f6d54c78 (patch)
tree2581216cc9406a97d728df1f8591956d89c913aa /drivers/net/ethernet
parentba650e7b6bca36e6c128a9b9c4488b68e1f8a813 (diff)
downloadlinux-7a0ee61df2d4fffcb5e798ab009d60c7f6d54c78.tar.xz
fs/cifs: suppress a string overflow warning
[ Upstream commit bcfb84a996f6fa90b5e6e2954b2accb7a4711097 ] A powerpc build of cifs with gcc v8.2.0 produces this warning: fs/cifs/cifssmb.c: In function ‘CIFSSMBNegotiate’: fs/cifs/cifssmb.c:605:3: warning: ‘strncpy’ writing 16 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=] strncpy(pSMB->DialectsArray+count, protocols[i].name, 16); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Since we are already doing a strlen() on the source, change the strncpy to a memcpy(). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet')
0 files changed, 0 insertions, 0 deletions