http://bugzilla.opensuse.org/show_bug.cgi?id=915387
http://bugzilla.opensuse.org/show_bug.cgi?id=915387#c3
Vitezslav Cizek
There seems to be a problem in less when searching for non-matches (with /!). Reproducible: Always
Steps to Reproduce: 1. run "less somefile.txt" 2. type "/" and "!" then [Enter]
I can't reproduce it using these steps on neither 13.2 nor current Factory. Both contain less 458. Which less was the one you triggered the bug with?
The cause seems to be that *sp and *ep are not set to anything sensible for non-matches in pattern.c:match_pattern(), which results in hilite_line accessing some random memory.
I'll attach a patch which sets highlight to the whole string if SRCH_NO_MATCH is active. Alternatively one can move *sp = *ep = NULL; to the top of the function (then non-matches will not be highlighted).
(In reply to Valery Yundin from comment #2)
Upstream is working on it. Should be fixed in less-474.
I guess you discussed it with upstream, however the bug is not listed on the upstream bug list: http://www.greenwoodsoftware.com/less/bugs.html -- You are receiving this mail because: You are on the CC list for the bug.