]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: vars: only print first invalid char in fill_desc()
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Apr 2026 07:19:53 +0000 (09:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 30 Apr 2026 07:19:53 +0000 (09:19 +0200)
commit2464c735269816fe103a217528609e158d3a75dc
tree979126d0149daa7289e7034cd2ca22ecb94922bc
parent37b1f15d851bac39395cc6b5a29fbad868a45637
BUG/MINOR: vars: only print first invalid char in fill_desc()

The variable name is passed as (ptr,len) suggesting that certain callers
might not always have 0-terminated strings (e.g. when used in arguments
where closing parenthesis or commas might follow), the error message
carefully tries to designate the first invalid character, yet by mistake
it prints the whole string. This mistake has been there since commit
4834bc773c ("MEDIUM: vars: adds support of variables") in 1.6. Let's
properly report the char as promised instead. This could be backported
but is totally unimportant.
src/vars.c