1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

s3: libsmb: In SMB2 return NT_STATUS_INVALID_NETWORK_RESPONSE if name conversion ended up with a NULL filename.

Can happen if namelen == 0.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14374

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Jeremy Allison 2020-05-11 12:23:49 -07:00
parent b10de0bb64
commit 753115a8d1
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,2 @@
samba3.blackbox.smbclient_iconv.NT1
samba3.blackbox.smbclient_iconv.SMB2

View File

@ -1269,6 +1269,12 @@ static NTSTATUS parse_finfo_id_both_directory_info(uint8_t *dir_data,
/* Bad conversion. */
return NT_STATUS_INVALID_NETWORK_RESPONSE;
}
if (finfo->name == NULL) {
/* Bad conversion. */
return NT_STATUS_INVALID_NETWORK_RESPONSE;
}
return NT_STATUS_OK;
}