1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-database: Fix signed/unsigned comparison by casting

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2019-06-24 16:44:37 +10:00 committed by Amitay Isaacs
parent e7b586f711
commit 5527f3922f

View File

@ -96,7 +96,7 @@ static bool database_conf_validate_lock_debug_script(const char *key,
"%s/%s", "%s/%s",
path_etcdir(), path_etcdir(),
basename(script)); basename(script));
if (ret >= sizeof(script_path)) { if (ret < 0 || (size_t)ret >= sizeof(script_path)) {
D_ERR("lock debug script path too long\n"); D_ERR("lock debug script path too long\n");
return false; return false;
} }