From b9904204a39a06e70bac207805ef0ba22080bd35 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 20 Oct 2015 11:23:40 -0600 Subject: [PATCH] regcomp.c: Keep parse pointer on full character boundary I think, but am unsure, that this commit isn't necessary. Without it, the parse pointer can point to an interior byte of a multi-byte character. Recent work has sensitized me to trying to avoid this. So this commit advances the pointer a full character width at a time. --- regcomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regcomp.c b/regcomp.c index beec98d..611cc1c 100644 --- a/regcomp.c +++ b/regcomp.c @@ -13446,7 +13446,7 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist, RExC_parse++; if (*RExC_parse == 'c') { /* Skip the \cX notation for control characters */ - RExC_parse++; + RExC_parse += UTF ? UTF8SKIP(RExC_parse) : 1; } break; case '[': -- 1.8.3.1