diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2013-08-05 16:20:16 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-08-06 12:10:18 +0300 |
commit | 72fc5cf1e34f3087ca008218217e9fd7de0444eb (patch) | |
tree | f143067c7f047501b8f3fb9f6cbfb246e00cf879 /plugins/bluetooth.c | |
parent | c27e223272b35ed25443a6da6409fafc6e43f9e4 (diff) | |
download | connman-72fc5cf1e34f3087ca008218217e9fd7de0444eb.tar.gz |
bluetooth: Address pointer might be null when creating nap
Check pointer for null before dereferencing it.
Diffstat (limited to 'plugins/bluetooth.c')
-rw-r--r-- | plugins/bluetooth.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index 7fcf3fd8..82152c5a 100644 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -337,6 +337,11 @@ static void pan_create_nap(struct bluetooth_pan *pan) const char *name, *path; address = proxy_get_string(pan->btdevice_proxy, "Address"); + if (!address) { + connman_warn("Bluetooth device address missing"); + return; + } + address2ident(address, ident); pan->network = connman_network_create(ident, |