fix up potential printf's with unsafe format strings
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 24 Oct 2009 15:47:56 +0000 (17:47 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 24 Oct 2009 15:47:56 +0000 (17:47 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/sum.c
networking/tftp.c

index 60f3b30073d8d18288db988f3c528adad86f1ca3..35e89a6a391011cf1fd68b1f4b4c96cfc83b8248 100644 (file)
@@ -41,7 +41,7 @@ static unsigned sum_file(const char *file, unsigned type)
                        if (!bytes_read && !r)
                                /* no error */
                                break;
-                       bb_perror_msg(file);
+                       bb_simple_perror_msg(file);
                        return 0;
                }
 
index e4c31ee3c0f4a73c4857c28b0e35b2bf7f369fd3..9b08c147a8cb660a3cc3ce313832092d0b4a061e 100644 (file)
@@ -572,7 +572,7 @@ static int tftp_protocol(
        strcpy((char*)error_pkt_str, bb_msg_read_error);
  send_err_pkt:
        if (error_pkt_str[0])
-               bb_error_msg((char*)error_pkt_str);
+               bb_error_msg("%s", (char*)error_pkt_str);
        error_pkt[1] = TFTP_ERROR;
        xsendto(socket_fd, error_pkt, 4 + 1 + strlen((char*)error_pkt_str),
                        &peer_lsa->u.sa, peer_lsa->len);