mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
20750: fix hang with 20742
This commit is contained in:
parent
efd03cf9e8
commit
77bd05014d
@ -1,3 +1,8 @@
|
||||
2005-01-26 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 20750: Src/zle_utils.c: 20742 could cause hang when line
|
||||
resized to empty.
|
||||
|
||||
2005-01-25 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 20742: Src/system.h, Src/Zle/zle.h, Src/Zle/zle_main.c,
|
||||
|
@ -67,9 +67,16 @@ void
|
||||
sizeline(int sz)
|
||||
{
|
||||
while (sz > linesz)
|
||||
zleline =
|
||||
{
|
||||
if (linesz < 256)
|
||||
linesz = 256;
|
||||
else
|
||||
linesz *= 4;
|
||||
|
||||
zleline =
|
||||
(ZLE_STRING_T)realloc(zleline,
|
||||
((linesz *= 4) + 2) * ZLE_CHAR_SIZE);
|
||||
(linesz + 2) * ZLE_CHAR_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user