summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/compmatch.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bf6eef153..c5fabdea0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2025-11-12 Oliver Kiddle <opk@zsh.org>
+ * Heon Jeong: 54008: Src/Zle/compmatch.c: infinite loop running
+ completion with specific multibyte character and locale combination
+
* Christopher Bock: 54026: Completion/Debian/Command/_uscan:
update uscan options
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index b58bd1f05..bc82ff4d0 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -2487,10 +2487,12 @@ join_psfx(Cline ot, Cline nt, Cline *orest, Cline *nrest, int sfx)
/* We first get the length of the prefix equal in both strings. */
if (o->flags & CLF_LINE) {
- if ((len = sub_match(&md, o->line, o->llen, sfx)) != o->llen) {
+ if ((len = sub_match(&md, o->line, o->llen, sfx)) != o->llen
+ && len >= 0) {
join = 1; line = 1; slen = &(o->llen); sstr = &(o->line);
}
- } else if ((len = sub_match(&md, o->word, o->wlen, sfx)) != o->wlen) {
+ } else if ((len = sub_match(&md, o->word, o->wlen, sfx)) != o->wlen
+ && len >= 0) {
if (o->line) {
memcpy(&md, &omd, sizeof(struct cmdata));
o->flags |= CLF_LINE | CLF_DIFF;