HomeFreeBSD

bsdgrep: fix escape map building for multibyte strings

Description

bsdgrep: fix escape map building for multibyte strings

In BSD grep, fix escape map building in the regex parser. It was
previously using memory not explicitly initialized, and the MBS escape
map was being built based on a version of the pattern with escapes
already parsed out.

This is Kyle's change, but I restored the broken style that already
exists in this file.

Submitted by: Kyle Evans <kevans91 at ksu.edu>
Reviewed by: cem, Kyle Evans (my style changes)
Differential Revision: https://reviews.freebsd.org/D10098

Details

Provenance
emasteAuthored on
Reviewer
cem
Differential Revision
D10098: bsdgrep(1): Fix escape map building for multibyte strings
Parents
rS317703: bsdgrep: fix -w flag matching with an empty pattern
Branches
Unknown
Tags
Unknown