projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d3d347c
)
added missing parens in buffer allocation (caused seg violation)
author
Andrew Moore
<alm@FreeBSD.org>
Fri, 2 Jul 1993 10:55:17 +0000
(10:55 +0000)
committer
Andrew Moore
<alm@FreeBSD.org>
Fri, 2 Jul 1993 10:55:17 +0000
(10:55 +0000)
usr.bin/sed/process.c
patch
|
blob
|
blame
|
history
diff --git
a/usr.bin/sed/process.c
b/usr.bin/sed/process.c
index
75b08dc
..
014a059
100644
(file)
--- 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.
*/
* 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);
if (tlen > sp->blen) {
sp->blen = tlen + 1024;
sp->space = sp->back = xrealloc(sp->back, sp->blen);