mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 00:00:08 +01:00
libnm: abort huge read in nm_vpn_service_plugin_read_vpn_details()
There is no need to accept such a huge read. Abort.
This commit is contained in:
parent
4a9fcb0fc3
commit
6bf7908d05
1 changed files with 4 additions and 0 deletions
|
|
@ -835,6 +835,10 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable
|
|||
|
||||
if (!eof && c != '\n') {
|
||||
g_string_append_c(line, c);
|
||||
if (line->len > 512 * 1024) {
|
||||
/* we are about to read a huge line. That is not right, abort. */
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue