pgpool2.git / summary / log / commit / refs
commit 52d7ea7212463196b139734d59094851cdbc965d
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Thu Sep 12 12:32:35 2013 +0000
Fix a warning/error when compiling with -Werror=format-security.
Patch contributed by Christoph Berg ([pgpool-general: 2127]).
src/watchdog/wd_packet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/watchdog/wd_packet.c b/src/watchdog/wd_packet.c
index 123e0c72d..f9fa29eff 100644
--- a/src/watchdog/wd_packet.c
+++ b/src/watchdog/wd_packet.c
@@ -1111,8 +1111,8 @@ wd_calc_hash(const char *str, int len, char *buf)
username_len = authkey_len / 2;
pass_len = authkey_len - username_len;
- snprintf(username, username_len + 1, pool_config->wd_authkey);
- snprintf(pass, pass_len + 1, pool_config->wd_authkey + username_len);
+ snprintf(username, username_len + 1, "%s", pool_config->wd_authkey);
+ snprintf(pass, pass_len + 1, "%s", pool_config->wd_authkey + username_len);
/* calculate hash using md5 encrypt */
pool_md5_encrypt(pass, username, strlen(username), buf + MD5_PASSWD_LEN + 1);
[parent: 0036c99f4924]