mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 16:50:58 +01:00
handle possible NULL pointer returned from bufferwords() (15717)
This commit is contained in:
parent
7806ece931
commit
c0ea4d62c8
4 changed files with 16 additions and 10 deletions
|
|
@ -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--) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue