commit | ece9ea1c2e50697ed9b57fb53ff681d20b317610 | [log] [tgz] |
---|---|---|
author | Johan Hedberg <johan.hedberg@nokia.com> | Fri Oct 23 21:25:28 2009 +0300 |
committer | Johan Hedberg <johan.hedberg@nokia.com> | Fri Oct 23 21:25:28 2009 +0300 |
tree | b53280191859de10cd6d8e677faee66f84f5637a | |
parent | cfea4ccc6fc8e014bfbd5bb80de0a2b854fc373b [diff] |
Fix potential buffer overflow by using snprintf instead of sprintf
diff --git a/compat/dund.c b/compat/dund.c index f9847ea..74e19f4 100644 --- a/compat/dund.c +++ b/compat/dund.c
@@ -192,7 +192,7 @@ } ba2str(&sa.rc_bdaddr, ba); - sprintf(ch, "%d", channel); + snprintf(ch, sizeof(ch), "%d", channel); /* Setup environment */ setenv("DUN_BDADDR", ba, 1);