bsdgrep: Work-around for segmentation fault.

Fix by David Carlier.

Obtained from:	HardenedBSD
PR:		167921
MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@272127 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f