diff --git a/ctdb/database/database_conf.c b/ctdb/database/database_conf.c index 6bdb372bf03..4c7cb2d9ffe 100644 --- a/ctdb/database/database_conf.c +++ b/ctdb/database/database_conf.c @@ -96,7 +96,7 @@ static bool database_conf_validate_lock_debug_script(const char *key, "%s/%s", path_etcdir(), 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"); return false; }