public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] hurd hurdstartup: Initialize remaining fields of hurd_startup_data
@ 2023-01-02 10:36 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2023-01-02 10:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f77bd0ee9a4a7ef7295f3a35a0ca67c95c4e1bd6

commit f77bd0ee9a4a7ef7295f3a35a0ca67c95c4e1bd6
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Jan 2 01:36:02 2023 +0100

    hurd hurdstartup: Initialize remaining fields of hurd_startup_data
    
    In case we don't have a bootstrap port or __exec_startup_get_info
    failed, we should avoid leaking uninitialized fields of data.

Diff:
---
 hurd/hurdstartup.c | 5 +++++
 1 file changed, 5 insertions(+)

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])
     {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-02 10:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 10:36 [glibc] hurd hurdstartup: Initialize remaining fields of hurd_startup_data Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).