nerves-networking / vintage_net_wifi

WiFi networking for VintageNet
Apache License 2.0
32 stars 18 forks source link

Fix conversion of nulls SSID to wpa_supplicant.conf #187

Closed fhunleth closed 1 year ago

fhunleth commented 1 year ago

If someone tried to set the SSID to 13 NULL characters, i.e., <<0,0,0,0,0,0,0,0,0,0,0,0,0>>, the generated wpa_supplicant.conf would have an Elixir term in it and wpa_supplicant would crash repeatedly. This fixes this case and the general case where characters need escaping to be put in the wpa_supplicant.conf.

I couldn't verify whether the nulls SSID actually works, but wpa_supplicant doesn't crash.