From fd1ae05ea33f708a517b3b0d4f7d44dd874284a8 Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Fri, 2 Jul 1993 10:55:17 +0000 Subject: [PATCH] added missing parens in buffer allocation (caused seg violation) --- usr.bin/sed/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 75b08dcde8..014a05900f 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -564,7 +564,8 @@ cspace(sp, p, len, spflag) * need two extra bytes, one for the newline, one for a terminating * NULL. */ - tlen = sp->len + len + spflag == APPENDNL ? 2 : 1; +/* tlen = sp->len + len + spflag == APPENDNL ? 2 : 1; */ + tlen = sp->len + len + (spflag == APPENDNL ? 2 : 1); /* XXX */ if (tlen > sp->blen) { sp->blen = tlen + 1024; sp->space = sp->back = xrealloc(sp->back, sp->blen); -- 2.20.1