diff options
| author | Joey Pabalinas <joeypabalinas@gmail.com> | 2018-01-23 22:28:08 -0800 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2018-01-23 22:28:08 -0800 |
| commit | 110b13e1090bc31ac1352b28adc2d02b6d25a102 (patch) | |
| tree | c62d4fbe3974a8b1a914e8fd8e440db2151bd6cf /Src/subst.c | |
| parent | 42317: completion option updates for commands that have had recent updates (diff) | |
| download | zsh-110b13e1090bc31ac1352b28adc2d02b6d25a102.tar zsh-110b13e1090bc31ac1352b28adc2d02b6d25a102.tar.gz zsh-110b13e1090bc31ac1352b28adc2d02b6d25a102.tar.bz2 zsh-110b13e1090bc31ac1352b28adc2d02b6d25a102.tar.lz zsh-110b13e1090bc31ac1352b28adc2d02b6d25a102.tar.xz zsh-110b13e1090bc31ac1352b28adc2d02b6d25a102.tar.zst zsh-110b13e1090bc31ac1352b28adc2d02b6d25a102.zip | |
42313: avoid null-pointer deref when using ${(PA)...} on an empty array result
Diffstat (limited to 'Src/subst.c')
| -rw-r--r-- | Src/subst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/subst.c b/Src/subst.c index d027e3d83..a265a187e 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -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; /* |
