Closed
Description
In esp8266/modnetwork.c in function esp_connect isn't there a leak when an unsecure network is joined?
if (n_args > 1) {
p = mp_obj_str_get_data(args[1], &len); # len gets a presumably nonzero value
memcpy(config.ssid, p, len);
if (n_args > 2) {
p = mp_obj_str_get_data(args[2], &len);
} else {
p = ""; # len still has length of ssid
}
memcpy(config.password, p, len); # Doesn't this copy more than the empty string when unsecured network is joined?