about summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-08-28 08:41:51 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-08-28 08:41:51 +0000
commitc0ea4d62c81f7480192b1f61649f82d064dcb716 (patch)
tree3ff9b3deb6c3c95aa536ef59db564e73f97f4b9b /Src/subst.c
parent7806ece93122c27478d74d53518c75500c3a5749 (diff)
downloadzsh-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.c2
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));