mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
42313: avoid null-pointer deref when using ${(PA)...} on an empty array result
This commit is contained in:
parent
47430bcd7c
commit
110b13e109
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2018-01-23 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Joey Pabalinas: 42313: Src/subst.c: avoid null-pointer deref
|
||||
when using ${(PA)...} on an empty array result
|
||||
|
||||
2018-01-23 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* 42317: Completion/Linux/Command/_cryptsetup,
|
||||
|
|
|
@ -2430,7 +2430,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
|
|||
val = aval[0];
|
||||
isarr = 0;
|
||||
}
|
||||
s = dyncat(val, s);
|
||||
s = val ? dyncat(val, s) : dupstring(s);
|
||||
/* Now behave po-faced as if it was always like that... */
|
||||
subexp = 0;
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue