diff options
author | nicm <nicm> | 2022-08-03 13:27:48 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-08-03 13:27:48 +0000 |
commit | c6e7568471f35f7a22e199b444adf17c685e86f3 (patch) | |
tree | e373017e7bb325d47b622d462b157c0dcc15e774 | |
parent | 42ba6c1b229c92256274e848e9c5ff1d59d9081b (diff) | |
download | rtmux-c6e7568471f35f7a22e199b444adf17c685e86f3.tar.gz rtmux-c6e7568471f35f7a22e199b444adf17c685e86f3.tar.bz2 rtmux-c6e7568471f35f7a22e199b444adf17c685e86f3.zip |
Do not crash when searching for .* with extremely long lines. Reported
by Torbjorn Lonnemark, GitHub issue 3272.
-rw-r--r-- | window-copy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/window-copy.c b/window-copy.c index ab7ed5b1..834a2d99 100644 --- a/window-copy.c +++ b/window-copy.c @@ -3673,6 +3673,7 @@ window_copy_search(struct window_mode_entry *wme, int direction, int regex) if (direction && window_copy_search_mark_at(data, fx, fy, &at) == 0 && at > 0 && + data->searchmark != NULL && data->searchmark[at] == data->searchmark[at - 1]) { window_copy_move_after_search_mark(data, &fx, &fy, wrapflag); @@ -3705,6 +3706,7 @@ window_copy_search(struct window_mode_entry *wme, int direction, int regex) &start) == 0) { while (window_copy_search_mark_at(data, fx, fy, &at) == 0 && + data->searchmark != NULL && data->searchmark[at] == data->searchmark[start]) { data->cx = fx; |