diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 69152efde..d9a1603f6 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -3764,6 +3764,12 @@ static int wpa_global_config_parse_str(const struct global_parse_data *data, return -1; } + if (has_newline(pos)) { + wpa_printf(MSG_ERROR, "Line %d: invalid %s value with newline", + line, data->name); + return -1; + } + tmp = os_strdup(pos); if (tmp == NULL) return -1;