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
This commit is contained in:
parent
47a5d58e3b
commit
fa6fa98ac7
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue