Fix crashes with long argv incvocations.

Submitted-by:  Stacey Son <sson@freebsd.org>