projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4ebacb
)
wifi: Check for passphrase being not NULL before calling strlen
author
Mohamed Abbas
<mabbas@linux.intel.com>
Thu, 23 Dec 2010 21:28:47 +0000
(13:28 -0800)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 23 Dec 2010 22:35:50 +0000
(23:35 +0100)
It seems strlen(passphrase) was crashing on NULL passphrase.
plugins/wifi.c
patch
|
blob
|
history
diff --git
a/plugins/wifi.c
b/plugins/wifi.c
index
754b8b9
..
62d9216
100644
(file)
--- a/
plugins/wifi.c
+++ b/
plugins/wifi.c
@@
-608,7
+608,7
@@
static void ssid_init(GSupplicantSSID *ssid, struct connman_network *network)
ssid->security = network_security(security);
passphrase = connman_network_get_string(network,
"WiFi.Passphrase");
- if (strlen(passphrase) == 0)
+ if (
passphrase == NULL ||
strlen(passphrase) == 0)
ssid->passphrase = NULL;
else
ssid->passphrase = passphrase;