diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-08-28 08:41:51 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-08-28 08:41:51 +0000 |
commit | c0ea4d62c81f7480192b1f61649f82d064dcb716 (patch) | |
tree | 3ff9b3deb6c3c95aa536ef59db564e73f97f4b9b /Src/subst.c | |
parent | 7806ece93122c27478d74d53518c75500c3a5749 (diff) | |
download | zsh-c0ea4d62c81f7480192b1f61649f82d064dcb716.tar.gz zsh-c0ea4d62c81f7480192b1f61649f82d064dcb716.tar.xz zsh-c0ea4d62c81f7480192b1f61649f82d064dcb716.zip |
handle possible NULL pointer returned from bufferwords() (15717)
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 0ef084106..8bd1a1ae3 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -1833,7 +1833,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub) } else list = bufferwords(NULL, val, NULL); - if (!firstnode(list)) + if (!list || !firstnode(list)) val = dupstring(""); else if (!nextnode(firstnode(list))) val = getdata(firstnode(list)); |