[git commit master] fix up potential printf's with unsafe format strings

Denys Vlasenko vda.linux at googlemail.com
Sat Oct 24 15:47:56 UTC 2009


commit: http://git.busybox.net/busybox/commit/?id=0939f2ebd25a0f9905d0c50276f796497a57fa93
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/sum.c   |    2 +-
 networking/tftp.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/coreutils/sum.c b/coreutils/sum.c
index 60f3b30..35e89a6 100644
--- a/coreutils/sum.c
+++ b/coreutils/sum.c
@@ -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;
 		}
 
diff --git a/networking/tftp.c b/networking/tftp.c
index e4c31ee..9b08c14 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -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);
-- 
1.6.3.3



More information about the busybox-cvs mailing list