diff options
| author | Kenichi Handa | 2006-11-17 12:12:15 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-11-17 12:12:15 +0000 |
| commit | 347d9bbe01304b571d497eb60b5891044b428798 (patch) | |
| tree | ff1295e316f2b1c4503dd2bf0ae05b35a376c3ce /src | |
| parent | 07d59ce8e60d776071b75c827be856df6c633696 (diff) | |
| download | emacs-347d9bbe01304b571d497eb60b5891044b428798.tar.gz emacs-347d9bbe01304b571d497eb60b5891044b428798.zip | |
(simple_search): In the loop of backward searching,
check also the byte position against the limit.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/search.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c799feb1b3a..2f7149e6e94 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-11-17 NIIMI Satoshi <sa2c@sa2c.net> (tiny change) | ||
| 2 | |||
| 3 | * search.c (simple_search): In the loop of backward searching, | ||
| 4 | check also the byte position against the limit. | ||
| 5 | |||
| 1 | 2006-11-14 Romain Francoise <romain@orebokech.com> | 6 | 2006-11-14 Romain Francoise <romain@orebokech.com> |
| 2 | 7 | ||
| 3 | * minibuf.c (Fcompleting_read): Fix typo in docstring. | 8 | * minibuf.c (Fcompleting_read): Fix typo in docstring. |
diff --git a/src/search.c b/src/search.c index 7c3151b76b8..d6572c5397a 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1514,7 +1514,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) | |||
| 1514 | int this_len_byte = len_byte; | 1514 | int this_len_byte = len_byte; |
| 1515 | unsigned char *p = pat; | 1515 | unsigned char *p = pat; |
| 1516 | 1516 | ||
| 1517 | if (pos - len < lim) | 1517 | if (this_pos < lim || this_pos_byte < lim_byte) |
| 1518 | goto stop; | 1518 | goto stop; |
| 1519 | 1519 | ||
| 1520 | while (this_len > 0) | 1520 | while (this_len > 0) |