From ece9ea1c2e50697ed9b57fb53ff681d20b317610 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 23 Oct 2009 21:25:28 +0300 Subject: [PATCH] Fix potential buffer overflow by using snprintf instead of sprintf --- compat/dund.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/dund.c b/compat/dund.c index f9847ea83..74e19f442 100644 --- a/compat/dund.c +++ b/compat/dund.c @@ -192,7 +192,7 @@ static int do_listen(void) } ba2str(&sa.rc_bdaddr, ba); - sprintf(ch, "%d", channel); + snprintf(ch, sizeof(ch), "%d", channel); /* Setup environment */ setenv("DUN_BDADDR", ba, 1);