libc/regex: fix two buffer underruns.
commit27a317090771252c089acad12a67d26183eb1b5c
authorpfg <pfg@FreeBSD.org>
Sat, 21 May 2016 19:54:10 +0000 (21 19:54 +0000)
committerpfg <pfg@FreeBSD.org>
Sat, 21 May 2016 19:54:10 +0000 (21 19:54 +0000)
tree931d5284189b667eafa659463c41ab1c86f257d5
parent334d424627d50cc4cc73e73954534e23a1f91168
libc/regex: fix two buffer underruns.

Fix some rather complex regex issues found on OpenBSD as part of some
ongoing work to fix a sed(1) bug.

Curiously the OpenBSD tests don't trigger segfaults on FreeBSD but the
bugs were confirmed by running a port of FreeBSD's regex under OpenBSD's
malloc. Huge thanks to Ingo for confirming the behavior.

Taken from: Ingo Schwarze (through openbsd-tech 2016-05-15)
MFC after: 1 week
lib/libc/regex/engine.c