From cf70d9e66cc428b97f59d1cca621579346948015 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 18 Mar 2019 10:29:46 -0600 Subject: [PATCH] pp.c: Use safer utf8_hop --- pp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pp.c b/pp.c index 42b111e..1d83b08 100644 --- a/pp.c +++ b/pp.c @@ -6246,7 +6246,7 @@ PP(pp_split) /* The rx->minlen is in characters but we want to step * s ahead by bytes. */ if (do_utf8) - s = (char*)utf8_hop((U8*)m, len); + s = (char*)utf8_hop_forward((U8*) m, len, (U8*) strend); else s = m + len; /* Fake \n at the end */ } @@ -6270,7 +6270,7 @@ PP(pp_split) /* The rx->minlen is in characters but we want to step * s ahead by bytes. */ if (do_utf8) - s = (char*)utf8_hop((U8*)m, len); + s = (char*)utf8_hop_forward((U8*)m, len, (U8 *) strend); else s = m + len; /* Fake \n at the end */ } -- 1.8.3.1