]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: tools: Don't try to anonymize a NULL string
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 15 Sep 2026 05:36:27 +0000 (07:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:18 +0000 (17:05 +0200)
commiteaec3e46387c77dd2e7a490d116fe753dab6021d
treea9b5d873069d96d3e5c024aeb00169248006fd65
parentb38f5605d3a37d495d1b7ca4edecd67c2d7cff4b
BUG/MINOR: tools: Don't try to anonymize a NULL string

hash_anon() function is used to anonymize a string. It is called at several
places (via HA_ANON_* macros), especially from debugging functions. It is
hard to be sure the string to hash is always defined. So let's return
immediately if it is NULL.

Among other things, this fix avoids to get a crash when the server name
created by a LUA CO-SOCKET is anonymized. Indeed, this server is created
with no name.

This patch should fix the issue #3491. It must be backported as far as 2.8.
src/tools.c