summaryrefslogtreecommitdiffstats
path: root/hcid/device.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-03-11 21:38:36 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-03-11 21:38:36 +0000
commit272f467beabf0af74ae2beaf3529d076c36a3ee0 (patch)
tree55a9c52274dedf6c84a4719d8a10e964eb87353e /hcid/device.c
parentf6377c51e8c4de76bbcde216f461551fb7ab7061 (diff)
Fix invalid read when changing device name.
Diffstat (limited to 'hcid/device.c')
-rw-r--r--hcid/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hcid/device.c b/hcid/device.c
index f29e46a9..c7e8f509 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -645,7 +645,7 @@ int set_device_name(uint16_t dev_id, const char *name)
return -err;
}
- memcpy(dev->name, name, 248);
+ strncpy((char *) dev->name, name, 248);
update_ext_inquiry_response(dd, dev);