From: Willy Tarreau Date: Tue, 15 Sep 2026 14:37:58 +0000 (+0200) Subject: BUG/MINOR: cfgparse-global: add missing gotos to error label in max-spread-checks X-Git-Tag: v3.5-dev9~167 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=6a770228976b5463dbbbc70a39f784a02864ef54;p=haproxy.git BUG/MINOR: cfgparse-global: add missing gotos to error label in max-spread-checks The three error paths of the parse_time_err() call in the "max-spread-checks" keyword only set the error code without leaving the block, so that global.max_spread_checks was assigned an uninitialized value right after the error was reported. No impact but clearly what could report a build warning or a report from a static analyser. Let's just add the missing gotos like everywhere else. This may be backported to all supported versions. --- diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index b489c533a..0e8624de0 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -703,15 +703,18 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) ha_alert("parsing [%s:%d]: timer overflow in argument <%s> to <%s>, maximum value is 2147483647 ms (~24.8 days).\n", file, linenum, args[1], args[0]); err_code |= ERR_ALERT | ERR_FATAL; + goto out; } else if (err == PARSE_TIME_UNDER) { ha_alert("parsing [%s:%d]: timer underflow in argument <%s> to <%s>, minimum non-null value is 1 ms.\n", file, linenum, args[1], args[0]); err_code |= ERR_ALERT | ERR_FATAL; + goto out; } else if (err) { ha_alert("parsing [%s:%d]: unsupported character '%c' in '%s' (wants an integer delay).\n", file, linenum, *err, args[0]); err_code |= ERR_ALERT | ERR_FATAL; + goto out; } global.max_spread_checks = val; }