]> Pileus Git - ~andy/fetchmail/commitdiff
Fix format string bugs.
authorMatthias Andree <matthias.andree@gmx.de>
Mon, 4 May 2009 22:00:18 +0000 (22:00 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Mon, 4 May 2009 22:00:18 +0000 (22:00 -0000)
svn path=/branches/BRANCH_6-3/; revision=5291

pop3.c
report.c
smtp.c

diff --git a/pop3.c b/pop3.c
index 14cfde8205528827241b830600f5b58b22c49e4b..7e7757d2368f17fa44126a40960f8407340f2733 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -771,7 +771,7 @@ static int pop3_gettopid(int sock, int num , char *id, size_t idsize)
     int got_it;
     char buf [POPBUFSIZE+1];
     snprintf(buf, sizeof(buf), "TOP %d 1", num);
-    if ((ok = gen_transact(sock, buf )) != 0)
+    if ((ok = gen_transact(sock, "%s", buf)) != 0)
        return ok;
     got_it = 0;
     while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0) 
index 851f7dd13c6c479f4968a483948e1ab2f85f3254..fa1ce4adf276b0ca86fad6adf50426459d37bc45 100644 (file)
--- a/report.c
+++ b/report.c
@@ -274,7 +274,7 @@ void report_flush(FILE *errfp)
     if (partial_message_size_used != 0)
     {
        partial_message_size_used = 0;
-       report(errfp, partial_message);
+       report(errfp, "%s", partial_message);
        partial_suppress_tag = 1;
     }
 }
diff --git a/smtp.c b/smtp.c
index 2517d15ab7230033bc51248f98f048ba6f7a032c..96a708e34bb7aea1b134efa7eaea2623335b3703 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -55,7 +55,7 @@ static void SMTP_auth_error(int sock, const char *msg)
 {
     SockPrintf(sock, "*\r\n");
     SockRead(sock, smtp_response, sizeof(smtp_response) - 1);
-    if (outlevel >= O_MONITOR) report(stdout, msg);
+    if (outlevel >= O_MONITOR) report(stdout, "%s", msg);
 }
 
 static void SMTP_auth(int sock, char smtp_mode, char *username, char *password, char *buf)