Fixes:
source3/libsmb/clifile.c:360:19: warning: The left operand of '-' is a garbage value <--[clang]
if (data[num_data-1] != '\0') {
~~~~~~~~^
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 22 18:48:43 UTC 2019 on sn-devel-184
req, struct cli_posix_readlink_state);
NTSTATUS status;
uint8_t *data = NULL;
- uint32_t num_data;
+ uint32_t num_data = 0;
charset_t charset;
size_t converted_size;
bool ok;
/*
* num_data is > 1, we've given 1 as minimum to cli_qpathinfo_send
*/
- if (data[num_data-1] != '\0') {
+ if (data == NULL || data[num_data-1] != '\0') {
tevent_req_nterror(req, NT_STATUS_DATA_ERROR);
return;
}