Skip to content

Commit

Permalink
Addressed CodeQL gripe about uncontrolled format string in handling o…
Browse files Browse the repository at this point in the history
…f the GEARMAND_PORT environment variable by changing how gearmand_log_gai_error() calls gearmand_log_perror().
  • Loading branch information
esabol committed Aug 25, 2024
1 parent 728f3a5 commit 3f9a48f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libgearman-server/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 3f9a48f

Please sign in to comment.