From 8344225aef312994691441c429164950391c5539 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 30 Mar 2017 12:54:23 -0700 Subject: [PATCH] ALTAIR: Leave room for NUL byte in the degenerate case (COVERITY) --- ALTAIR/altair_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALTAIR/altair_sys.c b/ALTAIR/altair_sys.c index 5f898dfb..daab06bb 100644 --- a/ALTAIR/altair_sys.c +++ b/ALTAIR/altair_sys.c @@ -252,7 +252,7 @@ if ((sw & SWMASK ('C')) || ((*cptr == '"') && cptr++)) { /* ASCII string? */ or numeric (including spaces). */ -while (i < sizeof (gbuf) - 3) { +while (i < sizeof (gbuf) - 4) { if (*cptr == ',' || *cptr == '\0' || sim_isdigit(*cptr)) break;