summaryrefslogtreecommitdiffstats
path: root/tools/hcitool.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hcitool.c')
-rw-r--r--tools/hcitool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 156b0790..ba8ba823 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -514,6 +514,7 @@ static void cmd_scan(int dev_id, int argc, char **argv)
for (n = 0; n < 248 && name[n]; n++)
if (!isprint(name[n]))
name[n] = '.';
+ name[248] = '\0';
printf("\t%s\t%s\n", addr, name);
continue;
@@ -572,6 +573,7 @@ static void cmd_scan(int dev_id, int argc, char **argv)
for (n = 0; n < 248 && name[n]; n++)
if (!isprint(name[n]))
name[n] = '.';
+ name[248] = '\0';
nc = 0;
}
}