[pcre-dev] [Bug 1068] Another segfault with --color=auto opt…

Pàgina inicial
Delete this message
Autor: Philip Hazel
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 1068] Another segfault with --color=auto option
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1068

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





--- Comment #1 from Philip Hazel <ph10@???> 2011-01-14 19:06:40 ---
There were two bugs here, both provoked by the fact that your pattern ended
with an explicit newline. (1) Having coloured the matched string, it was
computing that it needed to print out -1 characters to complete the line. Since
the length is an unsigned number, this was trying to output random memory. (On
my Linux box it did not crash, but valgrind found the problem.) (2) When a
matched string finished exactly at the end of a line (as yours did), pcregrep
was also outputting the following line, which I don't think is right. The
specification is that, in -M mode, it outputs from the line in which the match
starts upto and including the line in which it ends.

I have committed patches that fix both these problems. I am planning to release
PCRE 8.12 very shortly (probably tomorrow, unless anything else turns up).
Thanks for your testing!


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email