HomeFreeBSD

MFC r357875: diff: fix segfault with --tabsize and no/malformed argument

Description

MFC r357875: diff: fix segfault with --tabsize and no/malformed argument

--tabsize was previously listed as optional_argument, but didn't account for
the optionality of it in the argument handling. This is irrelevant -- the
manpage doesn't indicate that the argument is optional, and indeed there's
no clear interpretation of omitting the argument because there's no other
side effect of --tabsize.

The "malformed" argument part of the header on this message is simply
referring to usage like this:

% diff --tabsize 4 A B

With an optional_argument, the argument must be attached to the parameter
directly (e.g. --tabsize=4), so the argument is effectively NULL with the
above invocation as if no argument had been passed.

PR: 243974

Details

Provenance
kevansAuthored on
Parents
rS360406: MFC r360182-r360183: kqueue(2): add note about EV_RECEIPT
Branches
Unknown
Tags
Unknown