HomeFreeBSD

regexec: fix processing multibyte strings.

Description

regexec: fix processing multibyte strings.

Matcher function incorrectly assumed that moffset that we get from
findmust is in bytes. Fix this by introducing a stepback function,
taking short path if MB_CUR_MAX is 1, and going back byte-by-byte,
checking if we have a legal character sequence otherwise.

PR: 153502
Reviewed by: pfg, kevans
Approved by: kib (mentor, implicit)
Differential revision: https://reviews.freebsd.org/D18297

Details

Provenance
yuripvAuthored on
Reviewer
pfg
Differential Revision
D18297: PR153502: [libc] regex(3) bug with UTF-8 locale
Parents
rS340834: Disable build-id in i386 binary boot components
Branches
Unknown
Tags
Unknown