[pcre-dev] [Bug 1468] Segmentation fault for a text starting…

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 1468] Segmentation fault for a text starting with 0x80 - 0xbf in UTF-8 mode
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #6 from Philip Hazel <ph10@???> 2014-04-21 16:06:45 ---
On Mon, 21 Apr 2014, Norihiro Tanaka wrote:

> --- Comment #5 from Norihiro Tanaka <noritnk@???> 2014-04-21 15:57:26 ---
> Thanks. Should `PCRE_NO_UTF8_CHECK' be used only when it's guaranteed
> that a string is valid UTF-8?


YES. That is the whole point. This is what the documentation says (in
the pcreapi page):

When PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid
string as a subject or an invalid value of startoffset is undefined.
Your program may crash or loop.

Philip


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