mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
40260: zero new space allocated in prompt buffer
This commit is contained in:
parent
4fb4ce190c
commit
8d4c98540d
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2017-01-03 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* Paulo Andrade: 40260: Src/prompt.c: Set newly allocated
|
||||
space in prompt buffer to zero as it may be tested.
|
||||
|
||||
2016-12-28 Sebastian Gniazdowski <psprint@fastmail.com>
|
||||
|
||||
* 40231: Src/params.c: Optimise setarrvalue().
|
||||
|
|
|
@ -920,6 +920,7 @@ addbufspc(int need)
|
|||
if(need & 255)
|
||||
need = (need | 255) + 1;
|
||||
bv->buf = realloc(bv->buf, bv->bufspc += need);
|
||||
memset(bv->buf + bv->bufspc - need, 0, need);
|
||||
bv->bp = bv->buf + bo;
|
||||
if(bo1 != -1)
|
||||
bv->bp1 = bv->buf + bo1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue