[Pcre-svn] [1146] code/trunk/pcre_study.c: Fix a possible ov…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1146] code/trunk/pcre_study.c: Fix a possible overflow in 64 bit.
Revision: 1146
          http://vcs.pcre.org/viewvc?view=rev&revision=1146
Author:   zherczeg
Date:     2012-10-20 17:45:33 +0100 (Sat, 20 Oct 2012)


Log Message:
-----------
Fix a possible overflow in 64 bit.

Modified Paths:
--------------
    code/trunk/pcre_study.c


Modified: code/trunk/pcre_study.c
===================================================================
--- code/trunk/pcre_study.c    2012-10-19 16:25:32 UTC (rev 1145)
+++ code/trunk/pcre_study.c    2012-10-20 16:45:33 UTC (rev 1146)
@@ -325,7 +325,8 @@


 #if defined SUPPORT_UTF || !defined COMPILE_PCRE8
     case OP_XCLASS:
-    cc += GET(cc, 1) - PRIV(OP_lengths)[OP_CLASS];
+    cc += GET(cc, 1);
+    cc -= PRIV(OP_lengths)[OP_CLASS];
     /* Fall through */
 #endif