* src/dfa.c (add_utf8_anychar): Avoid signed integer overflow.
Although this works on all platforms we know about, strictly
speaking the behavior is undefined, and Sun C 5.8 warns about it.
---
 src/dfa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index 2a69025..4f5eb96 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1633,7 +1633,7 @@ add_utf8_anychar (void)
   static const charclass utf8_classes[5] = {
       {  0,  0,  0,  0, ~0, ~0, 0, 0 },            /* 80-bf: non-lead bytes */
       { ~0, ~0, ~0, ~0, 0, 0, 0, 0 },              /* 00-7f: 1-byte sequence */
-      {  0,  0,  0,  0,  0,  0, 0xfffffffcU, 0 },  /* c2-df: 2-byte sequence */
+      {  0,  0,  0,  0,  0,  0, ~3, 0 },           /* c2-df: 2-byte sequence */
       {  0,  0,  0,  0,  0,  0,  0, 0xffff },      /* e0-ef: 3-byte sequence */
       {  0,  0,  0,  0,  0,  0,  0, 0xff0000 }     /* f0-f7: 4-byte sequence */
   };
-- 
1.7.6.5


Reply via email to