projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
941e94a
)
config: Reject invalid SSID hexadecimal entries
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 14 May 2012 12:20:44 +0000
(15:20 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Tue, 15 May 2012 12:52:07 +0000
(15:52 +0300)
Reject provisioning .config file SSID entries that are not in
hexadecimal.
src/config.c
patch
|
blob
|
history
diff --git
a/src/config.c
b/src/config.c
index
781427d
..
66e1316
100644
(file)
--- a/
src/config.c
+++ b/
src/config.c
@@
-258,7
+258,13
@@
static int load_service(GKeyFile *keyfile, const char *group,
}
for (i = 0; i < hex_ssid_len; i += 2) {
- sscanf(hex_ssid + i, "%02x", &hex);
+ if (sscanf(hex_ssid + i, "%02x", &hex) <= 0) {
+ connman_warn("Invalid SSID %s", hex_ssid);
+ g_free(ssid);
+ g_free(hex_ssid);
+ err = -EILSEQ;
+ goto err;
+ }
ssid[j++] = hex;
}