]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: resolvers: fix room for trailing zero in resolv_dn_label_to_str()
authorWilly Tarreau <w@1wt.eu>
Sat, 23 May 2026 16:53:27 +0000 (18:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 May 2026 08:52:42 +0000 (10:52 +0200)
commit01ebb668a4622d17b7a92bb4c836441e3edd0d42
treeb71cab943fc210a07b42c4b9797e47a43c1973e5
parent340cc86efb2e792da157bde2499ee09932acebe2
BUG/MINOR: resolvers: fix room for trailing zero in resolv_dn_label_to_str()

The previous fix 75f72c2eb ("BUG/MEDIUM: resolvers: Fix test on dn label
size in resolv_dn_label_to_str()") can still be fooled by an input exactly
the size of str_len, in which case the trailing zero appended at the end
was not being accounted for. Let's add 1 to the condition to prepare for
it.

This needs to be backported wherever the fix above is backported.
src/resolvers.c