From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6407 invoked from network); 9 Mar 1999 14:21:03 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Mar 1999 14:21:03 -0000 Received: (qmail 22418 invoked by alias); 9 Mar 1999 14:20:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5710 Received: (qmail 22411 invoked from network); 9 Mar 1999 14:20:33 -0000 Date: Tue, 9 Mar 1999 15:19:49 +0100 (MET) Message-Id: <199903091419.PAA14741@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: tricky.c bug fix(es) With in-word completion and suffixes that caused the code to reduce it to an empty common suffix this could lead to a SEGV. And with the matching stuff we have now and in-word completion, we should do the fignore-test in addmatch() even if there is a suffix. Bye Sven --- os/Zle/zle_tricky.c Tue Mar 9 14:50:32 1999 +++ Src/Zle/zle_tricky.c Tue Mar 9 15:14:25 1999 @@ -2867,7 +2867,7 @@ o->suffix = join_new_sfx(o->suffix, n->wlen, n->word, &miss); if (miss) o->flags |= CLF_MISS; - } else { + } else if (o->wlen && n->wlen) { char so = o->word[o->wlen], sn = n->word[n->wlen]; char *new = o->word; int newl = o->wlen, mol, mnl; @@ -2893,7 +2893,8 @@ if (!o->suffix && n->wlen != o->wlen) o->flags |= CLF_MISS; - } + } else + o->wlen = 0; } /* Joins two Cline lists, building the most specific line string * @@ -4417,7 +4418,8 @@ return; if ((addwhat == CC_FILES || - addwhat == -5) && !*psuf && !*fsuf) { + addwhat == -5) && !*psuf) { + //---- && !*fsuf) { /* If this is a filename, do the fignore check. */ char **pt = fignore; int filell; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de