summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
Diffstat (limited to 'hcid')
-rw-r--r--hcid/security.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hcid/security.c b/hcid/security.c
index 718fff3d..fb4c813e 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -302,7 +302,7 @@ static void call_pin_helper(int dev, bdaddr_t *sba, struct hci_conn_info *ci)
{
pin_code_reply_cp pr;
struct sigaction sa;
- char addr[18], str[512], *pin, name[249], tmp[499], *ptr;
+ char addr[18], str[512], *pin, name[249], tmp[497], *ptr;
FILE *pipe;
int i, ret, len;
@@ -332,8 +332,13 @@ static void call_pin_helper(int dev, bdaddr_t *sba, struct hci_conn_info *ci)
for (i = 0; i < 248 && name[i]; i++)
if (isprint(name[i])) {
- if (name[i] == '"')
+ switch (name[i]) {
+ case '"':
+ case '`':
+ case '$':
+ case '\\':
*ptr++ = '\\';
+ }
*ptr++ = name[i];
} else
*ptr++ = '.';