diff mbox series

[hurd,commited,3/7] hurd hurdstartup: Initialize remaining fields of hurd_startup_data

Message ID 20230102100938.2778311-4-samuel.thibault@ens-lyon.org
State New
Headers show
Series hurd: fixes | expand

Commit Message

Samuel Thibault Jan. 2, 2023, 10:09 a.m. UTC
In case we don't have a bootstrap port or __exec_startup_get_info
failed, we should avoid leaking uninitialized fields of data.
---
 hurd/hurdstartup.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/hurd/hurdstartup.c b/hurd/hurdstartup.c
index e9cd8a360b..d312766052 100644
--- a/hurd/hurdstartup.c
+++ b/hurd/hurdstartup.c
@@ -145,6 +145,11 @@  _hurd_startup (void **argptr, void (*main) (intptr_t *data))
       data.portarraysize = 0;
       data.intarray = NULL;
       data.intarraysize = 0;
+      data.stack_base = 0;
+      data.stack_size = 0;
+      data.phdr = 0;
+      data.phdrsz = 0;
+      data.user_entry = 0;
     }
   else if ((void *) &envp[envc + 1] == argv[0])
     {