Hide hidden SSIDs
authorPeter Ryan <peterx14@gmail.com>
Wed, 4 Apr 2018 15:59:52 +0000 (16:59 +0100)
committerRoy Marples <roy@marples.name>
Mon, 9 Apr 2018 11:53:20 +0000 (12:53 +0100)
src/libdhcpcd/wpa.c

index 350c78152e835b4bc486f8fab632a8b53cb366ce..c59ec5ed0e327325732a721ce95dd2759aab9c58 100644 (file)
@@ -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;
                }
        }