@@ -725,6 +725,10 @@ static int msre_op_validateHash_param_init(msre_rule *rule, char **error_msg) {
725
725
#ifdef WITH_PCRE_JIT
726
726
#ifdef WITH_PCRE2
727
727
rc = regex -> jit_compile_rc ;
728
+ if (rc == 0 ) {
729
+ msc_fullinfo (regex , PCRE2_INFO_JITSIZE , & jit );
730
+ jit = (jit > 0 ) ? 1 : 0 ;
731
+ }
728
732
#else
729
733
rc = msc_fullinfo (regex , PCRE_INFO_JIT , & jit );
730
734
#endif
@@ -831,6 +835,10 @@ static int msre_op_validateHash_execute(modsec_rec *msr, msre_rule *rule, msre_v
831
835
if (msr -> txcfg -> debuglog_level >= 4 ) {
832
836
#ifdef WITH_PCRE2
833
837
rc = regex -> jit_compile_rc ;
838
+ if (rc == 0 ) {
839
+ msc_fullinfo (regex , PCRE2_INFO_JITSIZE , & jit );
840
+ jit = (jit > 0 ) ? 1 : 0 ;
841
+ }
834
842
#else
835
843
rc = msc_fullinfo (regex , PCRE_INFO_JIT , & jit );
836
844
#endif
@@ -1002,6 +1010,10 @@ static int msre_op_rx_param_init(msre_rule *rule, char **error_msg) {
1002
1010
#ifdef WITH_PCRE_JIT
1003
1011
#ifdef WITH_PCRE2
1004
1012
rc = regex -> jit_compile_rc ;
1013
+ if (rc == 0 ) {
1014
+ msc_fullinfo (regex , PCRE2_INFO_JITSIZE , & jit );
1015
+ jit = (jit > 0 ) ? 1 : 0 ;
1016
+ }
1005
1017
#else
1006
1018
rc = msc_fullinfo (regex , PCRE_INFO_JIT , & jit );
1007
1019
#endif
@@ -1100,6 +1112,10 @@ static int msre_op_rx_execute(modsec_rec *msr, msre_rule *rule, msre_var *var, c
1100
1112
if (msr -> txcfg -> debuglog_level >= 4 ) {
1101
1113
#ifdef WITH_PCRE2
1102
1114
rc = regex -> jit_compile_rc ;
1115
+ if (rc == 0 ) {
1116
+ msc_fullinfo (regex , PCRE2_INFO_JITSIZE , & jit );
1117
+ jit = (jit > 0 ) ? 1 : 0 ;
1118
+ }
1103
1119
#else
1104
1120
rc = msc_fullinfo (regex , PCRE_INFO_JIT , & jit );
1105
1121
#endif
@@ -2991,6 +3007,10 @@ static int msre_op_verifyCC_execute(modsec_rec *msr, msre_rule *rule, msre_var *
2991
3007
if (msr -> txcfg -> debuglog_level >= 4 ) {
2992
3008
#ifdef WITH_PCRE2
2993
3009
rc = regex -> jit_compile_rc ;
3010
+ if (rc == 0 ) {
3011
+ msc_fullinfo (regex , PCRE2_INFO_JITSIZE , & jit );
3012
+ jit = (jit > 0 ) ? 1 : 0 ;
3013
+ }
2994
3014
#else
2995
3015
rc = msc_fullinfo (regex , PCRE_INFO_JIT , & jit );
2996
3016
#endif
@@ -3330,6 +3350,10 @@ static int msre_op_verifyCPF_execute(modsec_rec *msr, msre_rule *rule, msre_var
3330
3350
if (msr -> txcfg -> debuglog_level >= 4 ) {
3331
3351
#ifdef WITH_PCRE2
3332
3352
rc = regex -> jit_compile_rc ;
3353
+ if (rc == 0 ) {
3354
+ msc_fullinfo (regex , PCRE2_INFO_JITSIZE , & jit );
3355
+ jit = (jit > 0 ) ? 1 : 0 ;
3356
+ }
3333
3357
#else
3334
3358
rc = msc_fullinfo (regex , PCRE_INFO_JIT , & jit );
3335
3359
#endif
@@ -3655,6 +3679,10 @@ static int msre_op_verifySSN_execute(modsec_rec *msr, msre_rule *rule, msre_var
3655
3679
if (msr -> txcfg -> debuglog_level >= 4 ) {
3656
3680
#ifdef WITH_PCRE2
3657
3681
rc = regex -> jit_compile_rc ;
3682
+ if (rc == 0 ) {
3683
+ msc_fullinfo (regex , PCRE2_INFO_JITSIZE , & jit );
3684
+ jit = (jit > 0 ) ? 1 : 0 ;
3685
+ }
3658
3686
#else
3659
3687
rc = msc_fullinfo (regex , PCRE_INFO_JIT , & jit );
3660
3688
#endif
0 commit comments