From 146f05d1f7e729734306a6af9aa0a076a3809b3a Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 25 Feb 2020 00:17:49 -0800 Subject: [PATCH] SCP: Cleanup compiler warning about potential buffer truncation --- scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scp.c b/scp.c index b31169aa..e23e7bc2 100644 --- a/scp.c +++ b/scp.c @@ -3607,7 +3607,7 @@ return do_cmd_label (flag, fcptr, NULL); static char *do_position(void) { -static char cbuf[CBUFSIZE]; +static char cbuf[4*CBUFSIZE]; snprintf (cbuf, sizeof (cbuf), "%s%s%s-%d", sim_do_filename[sim_do_depth], sim_do_label[sim_do_depth] ? "::" : "", sim_do_label[sim_do_depth] ? sim_do_label[sim_do_depth] : "", sim_goto_line[sim_do_depth]); return cbuf; @@ -5045,7 +5045,7 @@ return SCPE_UNK; /* only valid inside of t_stat call_cmd (int32 flag, CONST char *fcptr) { -char cbuf[CBUFSIZE], gbuf[CBUFSIZE]; +char cbuf[2*CBUFSIZE], gbuf[CBUFSIZE]; const char *cptr; if (NULL == sim_gotofile) return SCPE_UNK; /* only valid inside of do_cmd */