Merge branch 'wip/pwithnall/backport-3468-macos-spawn-crash-glib-2-76' into 'glib-2-76'

Backport !3468 “Avoid stack overflow in gspawn on macOS” to glib-2-76

See merge request GNOME/glib!3480
This commit is contained in:
Michael Catanzaro 2023-06-28 15:36:49 +00:00
commit 2c97a0c06d

View File

@ -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.
*/
{
char buffer[open_max * PROC_PIDLISTFD_SIZE];
char buffer[4096 * PROC_PIDLISTFD_SIZE];
ssize_t buffer_size;
buffer_size = proc_pidinfo (getpid (), PROC_PIDLISTFDS, 0, buffer, sizeof (buffer));