]> git.baikalelectronics.ru Git - 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)
committerSteve French <smfrench@gmail.com>
Wed, 7 Feb 2018 15:36:41 +0000 (09:36 -0600)
commit2fec489ea2ed1821722d11ee960fee34323b73e0
tree6425c03317799ce8b50da72e880a96243f4d5283
parentbf6f9d6e2fccd2c654c5585359566ab8208f8a56
cifs: silence compiler warnings showing up with gcc-8.0.0

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: 5fc459b7eabb ("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>
fs/cifs/cifssmb.c