summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ryan <peterx14@gmail.com>2018-04-04 16:59:52 +0100
committerRoy Marples <roy@marples.name>2018-04-09 12:53:20 +0100
commitb9967f34407a394dbe5c2edb708e58e1bf7ae62a (patch)
treebe2529ec053409339ac367895b81999e0956ce57
parentc1e232e0f969be4a1bb274ce7f24e748cfab8e65 (diff)
Hide hidden SSIDs
-rw-r--r--src/libdhcpcd/wpa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libdhcpcd/wpa.c b/src/libdhcpcd/wpa.c
index 350c781..c59ec5e 100644
--- a/src/libdhcpcd/wpa.c
+++ b/src/libdhcpcd/wpa.c
@@ -328,11 +328,13 @@ dhcpcd_wpa_decode_ssid(char *dst, size_t dlen, const char *src)
}
if ((xb = dhcpcd_wpa_hex2byte(src)) == -1)
return -1;
- *dst++ = (char)xb;
+ if (xb != 0)
+ *dst++ = (char)xb;
src += 2;
break;
default: errno = EINVAL; return -1;
}
+ break;
default: *dst++ = c; break;
}
}