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/Modules | |
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/Modules')
-rw-r--r-- | Src/Modules/parameter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index fe44eafb3..23c868598 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -1105,9 +1105,9 @@ histwgetfn(Param pm) int i = addhistnum(curhist, -1, HIST_FOREIGN), iw; Histent he = gethistent(i, GETHIST_UPWARD); - ll = bufferwords(NULL, NULL, NULL); - for (n = firstnode(ll); n; incnode(n)) - pushnode(l, getdata(n)); + if ((ll = bufferwords(NULL, NULL, NULL))) + for (n = firstnode(ll); n; incnode(n)) + pushnode(l, getdata(n)); while (he) { for (iw = he->nwords - 1; iw >= 0; iw--) { |