diff options
author | Swen Schillig <swen@linux.ibm.com> | 2019-03-06 09:34:10 +0100 |
---|---|---|
committer | Christof Schmitt <cs@samba.org> | 2019-04-11 22:29:26 +0000 |
commit | 1bdec2ce8c51edc5e23b87f43af14be443b61a84 (patch) | |
tree | 4c45596b7e157cdd52e52ddf3eac4f69f4b842d2 /source3 | |
parent | 8ca4b1f6d9bbd60b0e0d074221373aff27b0bdc2 (diff) | |
download | samba-1bdec2ce8c51edc5e23b87f43af14be443b61a84.tar.gz |
modules: Update error check for new string conversion wrapper
The new string conversion wrappers detect and flag errors
which occured during the string to integer conversion.
Those modifications required an update of the callees
error checks.
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_snapper.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c index fac4aa698de..39b8ccb097a 100644 --- a/source3/modules/vfs_snapper.c +++ b/source3/modules/vfs_snapper.c @@ -1216,7 +1216,6 @@ static NTSTATUS snapper_snap_path_to_id(TALLOC_CTX *mem_ctx, { char *path_dup; char *str_idx; - char *str_end; uint32_t snap_id; int error = 0; @@ -1251,8 +1250,8 @@ static NTSTATUS snapper_snap_path_to_id(TALLOC_CTX *mem_ctx, } str_idx++; - snap_id = strtoul_err(str_idx, &str_end, 10, &error); - if (error != 0 || str_idx == str_end) { + snap_id = strtoul_err(str_idx, NULL, 10, &error); + if (error != 0) { talloc_free(path_dup); return NT_STATUS_INVALID_PARAMETER; } |