]> granicus.if.org Git - curl/commitdiff
string formatting: fix zero-length printf format string
authorYang Tse <yangsita@gmail.com>
Wed, 24 Jul 2013 15:05:02 +0000 (17:05 +0200)
committerYang Tse <yangsita@gmail.com>
Wed, 24 Jul 2013 15:05:02 +0000 (17:05 +0200)
lib/imap.c
lib/pop3.c
lib/smtp.c

index ea175e6b98de491bfb8ca3cdc0c74a5ca95120f5..5d758d4558e9c75dd20fc6c4a181f328f56689e7 100644 (file)
@@ -1153,7 +1153,7 @@ static CURLcode imap_state_auth_digest_resp_resp(struct connectdata *conn,
   }
   else {
     /* Send an empty response */
-    result = Curl_pp_sendf(&conn->proto.imapc.pp, "");
+    result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", "");
 
     if(!result)
       state(conn, IMAP_AUTHENTICATE_FINAL);
@@ -1782,7 +1782,7 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
       state(conn, IMAP_FETCH_FINAL);
     else {
       /* End the APPEND command first by sending an empty line */
-      result = Curl_pp_sendf(&conn->proto.imapc.pp, "");
+      result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", "");
       if(!result)
         state(conn, IMAP_APPEND_FINAL);
     }
index 0099a509b5648b9efc77f4d1b06c486359ed1bac..57d40afdbf16f8bab33524f0899da12e82a95709 100644 (file)
@@ -405,7 +405,7 @@ static CURLcode pop3_perform_capa(struct connectdata *conn)
   pop3c->tls_supported = FALSE; /* Clear the TLS capability */
 
   /* Send the CAPA command */
-  result = Curl_pp_sendf(&pop3c->pp, "CAPA");
+  result = Curl_pp_sendf(&pop3c->pp, "%s", "CAPA");
 
   if(!result)
     state(conn, POP3_CAPA);
@@ -424,7 +424,7 @@ static CURLcode pop3_perform_starttls(struct connectdata *conn)
   CURLcode result = CURLE_OK;
 
   /* Send the STLS command */
-  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "STLS");
+  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "STLS");
 
   if(!result)
     state(conn, POP3_STARTTLS);
@@ -693,7 +693,7 @@ static CURLcode pop3_perform_command(struct connectdata *conn)
                            (pop3->custom && pop3->custom[0] != '\0' ?
                             pop3->custom : command), pop3->id);
   else
-    result = Curl_pp_sendf(&conn->proto.pop3c.pp,
+    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s",
                            (pop3->custom && pop3->custom[0] != '\0' ?
                             pop3->custom : command));
 
@@ -714,7 +714,7 @@ static CURLcode pop3_perform_quit(struct connectdata *conn)
   CURLcode result = CURLE_OK;
 
   /* Send the QUIT command */
-  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "QUIT");
+  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "QUIT");
 
   if(!result)
     state(conn, POP3_QUIT);
@@ -1020,7 +1020,7 @@ static CURLcode pop3_state_auth_digest_resp_resp(struct connectdata *conn,
   }
   else {
     /* Send an empty response */
-    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "");
+    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "");
 
     if(!result)
       state(conn, POP3_AUTH_FINAL);
index 04b33d0c4af7a5b903a6b01c23a7d4dc7d2096bd..8bb72aab468bf97830393d3892d8c51bc5a7c5a9 100644 (file)
@@ -403,7 +403,7 @@ static CURLcode smtp_perform_starttls(struct connectdata *conn)
   CURLcode result = CURLE_OK;
 
   /* Send the STARTTLS command */
-  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "STARTTLS");
+  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "STARTTLS");
 
   if(!result)
     state(conn, SMTP_STARTTLS);
@@ -664,7 +664,7 @@ static CURLcode smtp_perform_quit(struct connectdata *conn)
   CURLcode result = CURLE_OK;
 
   /* Send the QUIT command */
-  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "QUIT");
+  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "QUIT");
 
   if(!result)
     state(conn, SMTP_QUIT);
@@ -997,7 +997,7 @@ static CURLcode smtp_state_auth_digest_resp_resp(struct connectdata *conn,
   }
   else {
     /* Send an empty response */
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "");
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "");
 
     if(!result)
       state(conn, SMTP_AUTH_FINAL);
@@ -1159,7 +1159,7 @@ static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode,
     }
 
     /* Send the DATA command */
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "DATA");
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "DATA");
 
     if(!result)
       state(conn, SMTP_DATA);