diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-04-27 20:01:49 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-04-27 20:01:49 +0000 |
commit | bbcee91527ba3e0163b55a6e1bdca44f9239fbcf (patch) | |
tree | 140ef32c81604d2dd557565a8c59cdb9862feaff | |
parent | 91a10708b25b78d36549de0177e2330670fe163d (diff) | |
download | zsh-bbcee91527ba3e0163b55a6e1bdca44f9239fbcf.tar.gz zsh-bbcee91527ba3e0163b55a6e1bdca44f9239fbcf.tar.xz zsh-bbcee91527ba3e0163b55a6e1bdca44f9239fbcf.zip |
24886: fix endless loop in string isearch
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/zle_hist.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 09aabd7f8..854d84fa3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-27 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 24886: Src/Zle/zle_hist.c: using unupdated pos to set end_pos + in string isearch could cause endless loop. + 2008-04-26 Peter Stephenson <p.w.stephenson@ntlworld.com> * unposted: NEWS: note that COMBINING_CHARS is not on by diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index 203492b55..bc0598327 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -1323,7 +1323,7 @@ doisearch(char **args, int dir, int pattern) } else t = zlinefind(zt, pos, sbuf, dir, sens); if (t) - end_pos = pos + sbptr - (sbuf[0] == '^'); + end_pos = (t - zt) + sbptr - (sbuf[0] == '^'); } } if (t) { |