diff options
| author | Mikhail Filippov <[email protected]> | 2026-03-16 16:52:56 +0100 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2026-03-17 01:31:50 +0100 |
| commit | 7957a1f72005b7eeb7a3f79e6f67e232729df3db (patch) | |
| tree | 9cd7f543a0a808c8860e341ce539dc05ecadaca6 /src | |
| parent | build: Revert pkg-config requirement. (diff) | |
| download | libgpg-error-7957a1f72005b7eeb7a3f79e6f67e232729df3db.tar.gz libgpg-error-7957a1f72005b7eeb7a3f79e6f67e232729df3db.zip | |
spawn:w32: Fix use-after-scope of handle array.
* src/spawn-w32.c (_gpgrt_process_spawn): Move the hd[32] array
declaration from inside the inner block to the function scope, so that
the array remains live when CreateProcessW is called.
Diffstat (limited to 'src')
| -rw-r--r-- | src/spawn-w32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spawn-w32.c b/src/spawn-w32.c index c85be91..f21991a 100644 --- a/src/spawn-w32.c +++ b/src/spawn-w32.c @@ -548,6 +548,7 @@ _gpgrt_process_spawn (const char *pgmname, const char *argv[], HANDLE hd_in[2]; HANDLE hd_out[2]; HANDLE hd_err[2]; + HANDLE hd[32]; BOOL ask_inherit = FALSE; struct gpgrt_spawn_actions act_default; char *env = NULL; @@ -710,7 +711,6 @@ _gpgrt_process_spawn (const char *pgmname, const char *argv[], hd_err[1] = w32_open_null (1, enable_null_device); { - HANDLE hd[32]; HANDLE *hd_p = act->inherit_hds; int j = 0; |
