From: Huangbin Zhan Date: Thu, 2 Jul 2026 13:56:48 +0000 (-0400) Subject: BUG/MINOR: tools: fix invalid character detection in strl2ic() X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/static/gitweb.js?a=commitdiff_plain;h=c6d71297bcc6a9410d3cff46322f3c17f334b99e;p=haproxy.git BUG/MINOR: tools: fix invalid character detection in strl2ic() ASCII characters with a value smaller than '0' were not properly detected as invalid characters, leading to incorrect behavior. The strl2irc() and strl2llrc() functions are not impacted because this situation is detected by their overflow checks. Fixes Github issue #3357. --- diff --git a/src/tools.c b/src/tools.c index 6c3dce7c9..5b15905a8 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2584,8 +2584,8 @@ long long int read_int64(const char **s, const char *end) */ int strl2ic(const char *s, int len) { - int i = 0; - int j, k; + int i = 0, k; + unsigned int j; if (len > 0) { if (*s != '-') {