mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
Don't leak memory when compiling text following the a',
c' or `i' command.
Testcase: echo FOO | sed "/FOO/c\\ `jot -b 'aaaa\' 500`" Submitted by: Max Khon <fjoe@newst.net>
This commit is contained in:
parent
b36a733b6e
commit
94ccf5741c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76804
@ -653,7 +653,7 @@ compile_text()
|
||||
}
|
||||
if (asize - size < _POSIX2_LINE_MAX + 1) {
|
||||
asize *= 2;
|
||||
text = xmalloc(asize);
|
||||
text = xrealloc(text, asize);
|
||||
}
|
||||
}
|
||||
text[size] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user