Re: [PATCH] setup_revisions(): do not access outside argv
- From
Miles Bader <miles@gnu.org>
- Date
- May 21, 2009, 02:38 UTC
- Message-ID
- <buoljor6uzi.fsf@dhlpc061.dev.necel.com>
- In-Reply-To
- <7v7i0btdwu.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> If a function takes (int ac, char **av), then people should be able to > depend on the usual convention of > > (1) for any i < ac, av[i] is not NULL; and > (2) av[ac] is NULL.
Hmm, isn't potentially useful to be able to pass a sub-range (of a longer argv vector) to an ac/av function? In such a case, av[ac] may not be NULL.
-Miles
-- 97% of everything is grunge