[pcre-dev] [Bug 650] SIGSEGV with UTF-8 data

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 650] SIGSEGV with UTF-8 data
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

Philip Hazel <ph10@???> changed:

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





--- Comment #1 from Philip Hazel <ph10@???> 2007-12-29 17:02:46 ---
I do so love it when a bug report comes with a complete diagnosis and a
proposed patch (sent privately). Thank you! This is just in time to make it
into the forthcoming 7.5 release, currently in testing. I have committed a
patch that is based on yours, but differs in three ways: (a) I made a macro, to
save repetition. (b) I omitted the start_match < md->end_subject test because
pcre_exec() assumes that its subject is known to be a valid UTF-8 string. This
is tested at the start, and it is documented that if you disable the test the
result is undefined if you pass an invalid string. Plenty of places in the code
assume this, so it isn't useful to put in just a couple of tests. (c) I did not
make your change in two cases where it is known that *start_match=='\n' because
it is unnecessary there.


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