mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-07 11:41:16 +02:00
25972: leaked and uninitialised memory found by valgrind
This commit is contained in:
parent
135211b00b
commit
b9500900b1
3 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2008-10-30 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 25972: Src/Zle/complete.c, Src/Zle/compmatch.c: leaked
|
||||
and uninitialised memory found by valgrind.
|
||||
|
||||
* 25971: Src/builtin.c, Src/zsh.h: fix 25937 which broke some
|
||||
builtins that handle options themselves.
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ parse_class(Cpattern p, char *iptr)
|
|||
* As the input string is metafied, but shouldn't contain shell
|
||||
* tokens, we can just add our own tokens willy nilly.
|
||||
*/
|
||||
optr = p->u.str = zalloc((optr-iptr) + 1);
|
||||
optr = p->u.str = zhalloc((optr-iptr) + 1);
|
||||
|
||||
while (firsttime || *iptr != endchar) {
|
||||
int ch;
|
||||
|
|
|
@ -1687,6 +1687,7 @@ bld_line(Cmatcher mp, char **linep, char *mword, char *word, int wlen, int sfx)
|
|||
llen = mp->llen;
|
||||
rl = 0;
|
||||
|
||||
*line = '\0';
|
||||
if (sfx)
|
||||
{
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue