mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 19:10:24 +01:00
core: limit the result from the helper to 32MiB
This commit is contained in:
parent
99514da050
commit
c4b39914c4
1 changed files with 8 additions and 0 deletions
|
|
@ -5459,6 +5459,14 @@ helper_have_data(int fd, GIOCondition condition, gpointer user_data)
|
|||
n_read = nm_utils_fd_read(fd, &info->in_buffer);
|
||||
_LOG2T(info, "read returns %ld", (long) n_read);
|
||||
|
||||
if (info->in_buffer.len > 32 * 1024 * 1024) {
|
||||
helper_complete(info,
|
||||
g_error_new_literal(NM_UTILS_ERROR,
|
||||
NM_UTILS_ERROR_UNKNOWN,
|
||||
"the output is larger than 32MiB"));
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
if (n_read > 0)
|
||||
return G_SOURCE_CONTINUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue