[pcre-dev] [Bug 1037] Incorrect using of GETCHARLENGTH(...) …

Kezdőlap
Üzenet törlése
Szerző: Dmitry Ukolov
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 1037] Incorrect using of GETCHARLENGTH(...) in pcre_compile.c
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #3 from Dmitry Ukolov <udmitry@???> 2010-11-19 17:21:20 ---
Philip, I agree, it not works in this case.

but when i experimented with this and modify GETCHARLEN:

#define GETCHARLEN(c, eptr, len) \
  c = *eptr; \
  if (c >= 0xc0) \
    { \
    if ( 0 == (c & 0x20) ) { /* 2-bytes */ \
        c = ((c & 0x1f) << 6) | (eptr[1] & 0x3f); \
        len++; \
    } else { \
... old code


the origin code does not work with 2-byte symbol in classes

Now I modify GETCHARLEN (see #1040) and when discard changes in pcre_compile.c,
it works fine.

Dmitry.


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