mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
25656: free val only after it may be passed to strlen().
This commit is contained in:
parent
2b5ecaf476
commit
6b68cc95c7
2 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2008-09-13 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 25656: Src/params.c: free val only after it may be passed to
|
||||
strlen().
|
||||
|
||||
* 25655: Completion/Unix/Command/_rsync: remove completion for
|
||||
--remove-sent-files option.
|
||||
|
||||
|
|
|
@ -2235,10 +2235,10 @@ setstrvalue(Value v, char *val)
|
|||
case PM_INTEGER:
|
||||
if (val) {
|
||||
v->pm->gsu.i->setfn(v->pm, mathevali(val));
|
||||
zsfree(val);
|
||||
if ((v->pm->node.flags & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z)) &&
|
||||
!v->pm->width)
|
||||
v->pm->width = strlen(val);
|
||||
zsfree(val);
|
||||
}
|
||||
if (!v->pm->base && lastbase != -1)
|
||||
v->pm->base = lastbase;
|
||||
|
|
Loading…
Reference in a new issue