]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cifs: silence compiler warnings showing up with gcc-8.0.0
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Feb 2018 15:48:47 +0000 (16:48 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 17:44:25 +0000 (13:44 -0400)
commit42d8cf1b9875c1690448ab92f123566e19786403
tree23176d17511a0f58185a997a070632af4bcbb94b
parentb26b859d12368176d79b2061f71f3e1821fa26f7
cifs: silence compiler warnings showing up with gcc-8.0.0

BugLink: http://bugs.launchpad.net/bugs/1774063
[ Upstream commit ade7db991b47ab3016a414468164f4966bd08202 ]

This bug was fixed before, but came up again with the latest
compiler in another function:

fs/cifs/cifssmb.c: In function 'CIFSSMBSetEA':
fs/cifs/cifssmb.c:6362:3: error: 'strncpy' offset 8 is out of the bounds [0, 4] [-Werror=array-bounds]
   strncpy(parm_data->list[0].name, ea_name, name_len);

Let's apply the same fix that was used for the other instances.

Fixes: b2a3ad9ca502 ("cifs: silence compiler warnings showing up with gcc-4.7.0")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/cifs/cifssmb.c