diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-11-05 00:47:25 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-11-20 01:06:26 +0100 |
commit | a3a8c029ba77e16730b366e084444c9a393cfe92 (patch) | |
tree | a3336d504eda36a885c0cce4bd849adf1e3807ae | |
parent | 4adaf0ba0ea6a9f78c50fde67c10bbb8b43472b5 (diff) | |
download | neard-a3a8c029ba77e16730b366e084444c9a393cfe92.tar.gz neard-a3a8c029ba77e16730b366e084444c9a393cfe92.tar.bz2 neard-a3a8c029ba77e16730b366e084444c9a393cfe92.zip |
nfctool: Fix llcp-decode potential overflow
Code review done by Sebastian Krahmer <krahmer@suse.de>.
-rw-r--r-- | tools/nfctool/llcp-decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/nfctool/llcp-decode.c b/tools/nfctool/llcp-decode.c index 8704873..7f95640 100644 --- a/tools/nfctool/llcp-decode.c +++ b/tools/nfctool/llcp-decode.c @@ -268,7 +268,7 @@ static void llcp_print_params(struct sniffer_packet *packet) case LLCP_PARAM_SN: sn = g_strndup((gchar *)param + 2, param_len); llcp_add_connection_sn(packet, sn); - sprintf(param_str, "%s", sn); + snprintf(param_str, 64, "%s", sn); g_free(sn); break; @@ -279,7 +279,7 @@ static void llcp_print_params(struct sniffer_packet *packet) case LLCP_PARAM_SDREQ: tid = param[2]; sn = g_strndup((gchar *)param + 3, param_len - 1); - sprintf(param_str, "TID:%d, SN:%s", tid, sn); + snprintf(param_str, 64, "TID:%d, SN:%s", tid, sn); g_free(sn); break; |