utf8_hop_back: Check before derefencing

This conditional derefenced before checking if it is safe to dereference
This commit is contained in:
Karl Williamson 2023-07-16 19:17:54 -06:00
parent a5fea3d628
commit ef4802ef98

View File

@ -2150,7 +2150,7 @@ Perl_utf8_hop_back(const U8 *s, SSize_t off, const U8 *start)
while (off++ && s > start) {
do {
s--;
} while (UTF8_IS_CONTINUATION(*s) && s > start);
} while (s > start && UTF8_IS_CONTINUATION(*s));
}
GCC_DIAG_IGNORE(-Wcast-qual)