The branch main has been updated by bapt:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fa6fa98ac712e48fe8e9bca1295b1c54cf744724

commit fa6fa98ac712e48fe8e9bca1295b1c54cf744724
Author:     Daniel Kolesa <q...@chimera-linux.org>
AuthorDate: 2023-06-03 21:08:56 +0000
Commit:     Baptiste Daroussin <b...@freebsd.org>
CommitDate: 2023-06-03 21:09:31 +0000

    sh(1): initialize smark to zero in main()
    
    As popstackmark may be called on this without pushstackmark having
    been called, we need to initialize it so that we don't get a bogus
    comparison inside popstackmark, which would have resulted in a
    NULL pointer dereference.
    
    MFC After:      3 days
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D40413
---
 bin/sh/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/sh/main.c b/bin/sh/main.c
index bc87440807b2..a77f9528064d 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -100,7 +100,7 @@ static char *find_dot_file(char *);
 int
 main(int argc, char *argv[])
 {
-       struct stackmark smark, smark2;
+       struct stackmark smark = {0}, smark2;
        volatile int state;
        char *shinit;
 

Reply via email to