From 3f9a48fb4331afc73f7a72125daf5458be8a5d9b Mon Sep 17 00:00:00 2001 From: Ed Sabol <22986767+esabol@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:00:47 -0400 Subject: [PATCH] Addressed CodeQL gripe about uncontrolled format string in handling of the GEARMAND_PORT environment variable by changing how gearmand_log_gai_error() calls gearmand_log_perror(). --- libgearman-server/log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgearman-server/log.cc b/libgearman-server/log.cc index fb69bbfef..d39f42832 100644 --- a/libgearman-server/log.cc +++ b/libgearman-server/log.cc @@ -504,7 +504,7 @@ gearmand_error_t gearmand_log_gai_error(const char *position, const char *functi { if (rc == EAI_SYSTEM) { - return gearmand_log_perror(position, function, errno, message); + return gearmand_log_perror(position, function, errno, "%s", message); } gearmand_log_error(position, function, "%s getaddrinfo(%s)", message, gai_strerror(rc));