mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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: b2a3ad9ca5 ("cifs: silence compiler warnings showing up with gcc-4.7.0")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Steve French <[email protected]>
This commit is contained in:
parent
ede2e520a1
commit
ade7db991b
1 changed files with 1 additions and 3 deletions
|
|
@ -6343,9 +6343,7 @@ SetEARetry:
|
|||
pSMB->InformationLevel =
|
||||
cpu_to_le16(SMB_SET_FILE_EA);
|
||||
|
||||
parm_data =
|
||||
(struct fealist *) (((char *) &pSMB->hdr.Protocol) +
|
||||
offset);
|
||||
parm_data = (void *)pSMB + offsetof(struct smb_hdr, Protocol) + offset;
|
||||
pSMB->ParameterOffset = cpu_to_le16(param_offset);
|
||||
pSMB->DataOffset = cpu_to_le16(offset);
|
||||
pSMB->SetupCount = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue