diff options
author | Petri Gynther <pgynther@google.com> | 2014-02-18 16:44:13 -0800 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-19 06:14:17 +0200 |
commit | 0b4da9426f177bf46aa77b12e05da147a8b6f108 (patch) | |
tree | 729ca0debf6c368b1402aa06b1dfb2833339fd6a /plugins/wiimote.c | |
parent | b81d63d581a4fc2a5f76ed5fe03be2d3a32ef51b (diff) | |
download | bluez-0b4da9426f177bf46aa77b12e05da147a8b6f108.tar.gz |
core: Fix device_get_name() to always null-terminate what it returns
Fix device_get_name() to null-terminate the name string it returns.
Modify all callers as needed.
Diffstat (limited to 'plugins/wiimote.c')
-rw-r--r-- | plugins/wiimote.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/plugins/wiimote.c b/plugins/wiimote.c index c23607faf..bd8820eb3 100644 --- a/plugins/wiimote.c +++ b/plugins/wiimote.c @@ -90,7 +90,6 @@ static ssize_t wii_pincb(struct btd_adapter *adapter, struct btd_device *device, product = btd_device_get_product(device); device_get_name(device, name, sizeof(name)); - name[sizeof(name) - 1] = 0; for (i = 0; i < G_N_ELEMENTS(wii_ids); ++i) { if (vendor == wii_ids[i][0] && product == wii_ids[i][1]) |