mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
tests: Fix use of three uninitialised array elements in spawn-singlethread
Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2836
This commit is contained in:
parent
7bb0261407
commit
d5011f91a8
@ -327,8 +327,13 @@ test_spawn_async_with_invalid_fds (void)
|
||||
gboolean retval;
|
||||
gsize i;
|
||||
|
||||
/* this is very likely going to conflict with the internal fds, if not then skip */
|
||||
for (i = 3; i < G_N_ELEMENTS (source_fds); i++)
|
||||
/* Create an identity mapping from [0, …, 999]. This is very likely going to
|
||||
* conflict with the internal FDs, as it covers a lot of the FD space
|
||||
* (including stdin, stdout and stderr, though we don’t care about them in
|
||||
* this test).
|
||||
*
|
||||
* Skip the test if we somehow avoid a collision. */
|
||||
for (i = 0; i < G_N_ELEMENTS (source_fds); i++)
|
||||
source_fds[i] = i;
|
||||
|
||||
retval = g_spawn_async_with_pipes_and_fds (NULL, argv, NULL, G_SPAWN_DEFAULT,
|
||||
|
Loading…
Reference in New Issue
Block a user