Skip to content

Commit

Permalink
38150: fix off-by-one error in matcher spec parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
m0vie authored and bart-schaefer committed Dec 24, 2021
1 parent 7f240e6 commit d826048
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2021-12-24 Bart Schaefer <schaefer@zsh.org>

* m0viefreak: 38150: Src/Zle/compmatch.c: fix off-by-one error
in matcher spec parsing

2021-12-21 Peter Stephenson <p.stephenson@samsung.com>

* 49658: Src/glob.c: Remove erroneous use of NULL pointer for
Expand Down
2 changes: 1 addition & 1 deletion Src/Zle/compmatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ pattern_match_equivalence(Cpattern lp, convchar_t wind, int wmtp,
convchar_t lchr;
int lmtp;

if (!PATMATCHINDEX(lp->u.str, wind-1, &lchr, &lmtp)) {
if (!PATMATCHINDEX(lp->u.str, wind, &lchr, &lmtp)) {
/*
* No equivalent. No possible match; give up.
*/
Expand Down

0 comments on commit d826048

Please sign in to comment.