mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
Avoid stack overflow in gspawn on macOS
This commit is contained in:
committed by
Philip Withnall
parent
49c2fe77c1
commit
9f5590aee1
@@ -1553,7 +1553,7 @@ safe_fdwalk_with_invalid_fds (int (*cb)(void *data, int fd), void *data)
|
|||||||
* It's just a thin wrapper around a syscall, so it's probably okay.
|
* It's just a thin wrapper around a syscall, so it's probably okay.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
char buffer[open_max * PROC_PIDLISTFD_SIZE];
|
char buffer[4096 * PROC_PIDLISTFD_SIZE];
|
||||||
ssize_t buffer_size;
|
ssize_t buffer_size;
|
||||||
|
|
||||||
buffer_size = proc_pidinfo (getpid (), PROC_PIDLISTFDS, 0, buffer, sizeof (buffer));
|
buffer_size = proc_pidinfo (getpid (), PROC_PIDLISTFDS, 0, buffer, sizeof (buffer));
|
||||||
|
Reference in New Issue
Block a user