From af54a5c8fdbe970f42d4dc243fd60c96bad16b7d Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 1 May 2017 08:11:36 -0700 Subject: [PATCH] SCP: Fix out of scope memory reference in SET ENV -P "Prompt" EnvVar=Default --- scp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scp.c b/scp.c index 5357fbc0..c42efdcc 100644 --- a/scp.c +++ b/scp.c @@ -4005,12 +4005,11 @@ return SCPE_OK; t_stat sim_set_environment (int32 flag, CONST char *cptr) { -char varname[CBUFSIZE], prompt[CBUFSIZE]; +char varname[CBUFSIZE], prompt[CBUFSIZE], cbuf[CBUFSIZE]; if ((!cptr) || (*cptr == 0)) /* now eol? */ return SCPE_2FARG; if (sim_switches & SWMASK ('P')) { - char cbuf[CBUFSIZE]; CONST char *deflt = NULL; cptr = get_glyph_quoted (cptr, prompt, 0); /* get prompt */