@@ -3071,7 +3071,7 @@ const pcre_uint32 *ochr_ptr;
3071
3071
const pcre_uint32 * list_ptr ;
3072
3072
const pcre_uchar * next_code ;
3073
3073
const pcre_uint8 * class_bitset ;
3074
- const pcre_uint32 * set1 , * set2 , * set_end ;
3074
+ const pcre_uint8 * set1 , * set2 , * set_end ;
3075
3075
pcre_uint32 chr ;
3076
3076
BOOL accepted , invert_bits ;
3077
3077
@@ -3202,12 +3202,12 @@ for(;;)
3202
3202
if (base_list [0 ] == OP_CLASS )
3203
3203
#endif
3204
3204
{
3205
- set1 = (pcre_uint32 * )(base_end - base_list [2 ]);
3205
+ set1 = (pcre_uint8 * )(base_end - base_list [2 ]);
3206
3206
list_ptr = list ;
3207
3207
}
3208
3208
else
3209
3209
{
3210
- set1 = (pcre_uint32 * )(code - list [2 ]);
3210
+ set1 = (pcre_uint8 * )(code - list [2 ]);
3211
3211
list_ptr = base_list ;
3212
3212
}
3213
3213
@@ -3216,41 +3216,38 @@ for(;;)
3216
3216
{
3217
3217
case OP_CLASS :
3218
3218
case OP_NCLASS :
3219
- set2 = (pcre_uint32 * )
3219
+ set2 = (pcre_uint8 * )
3220
3220
((list_ptr == list ? code : base_end ) - list_ptr [2 ]);
3221
3221
break ;
3222
3222
3223
- /* OP_XCLASS cannot be supported here, because its bitset
3224
- is not necessarily complete. E.g: [a-\0x{200}] is stored
3225
- as a character range, and the appropriate bits are not set. */
3226
-
3227
3223
case OP_NOT_DIGIT :
3228
- invert_bits = TRUE;
3229
- /* Fall through */
3224
+ invert_bits = TRUE;
3225
+ /* Fall through */
3230
3226
case OP_DIGIT :
3231
- set2 = (pcre_uint32 * )(cd -> cbits + cbit_digit );
3232
- break ;
3227
+ set2 = (pcre_uint8 * )(cd -> cbits + cbit_digit );
3228
+ break ;
3233
3229
3234
3230
case OP_NOT_WHITESPACE :
3235
- invert_bits = TRUE;
3236
- /* Fall through */
3231
+ invert_bits = TRUE;
3232
+ /* Fall through */
3237
3233
case OP_WHITESPACE :
3238
- set2 = (pcre_uint32 * )(cd -> cbits + cbit_space );
3239
- break ;
3234
+ set2 = (pcre_uint8 * )(cd -> cbits + cbit_space );
3235
+ break ;
3240
3236
3241
3237
case OP_NOT_WORDCHAR :
3242
- invert_bits = TRUE;
3243
- /* Fall through */
3238
+ invert_bits = TRUE;
3239
+ /* Fall through */
3244
3240
case OP_WORDCHAR :
3245
- set2 = (pcre_uint32 * )(cd -> cbits + cbit_word );
3246
- break ;
3241
+ set2 = (pcre_uint8 * )(cd -> cbits + cbit_word );
3242
+ break ;
3247
3243
3248
3244
default :
3249
3245
return FALSE;
3250
3246
}
3251
3247
3252
- /* Compare 4 bytes to improve speed. */
3253
- set_end = set1 + (32 / 4 );
3248
+ /* Because the sets are unaligned, we need
3249
+ to perform byte comparison here. */
3250
+ set_end = set1 + 32 ;
3254
3251
if (invert_bits )
3255
3252
{
3256
3253
do
0 commit comments