Re: [PATCH] help: Add a missing OPT_END().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Wed, Apr 02, 2008 at 05:47:41AM +0200, Christian Couder wrote:
>
>> 	Some comments in "parse-options.h" say it is needed,
>> 	though I did not see a crash without it.
>
> There was no particular reason I didn't put it in; I just didn't know
> about it. So ack from me, assuming it is supposed to be there.

parse-options.c::parse_short_opt() and parse_long_opt() has this loop:

	for (; options->type != OPTION_END; options++) {
		...
	}

So whatever happens to come after builtin_help_options[] may be read from
by this loop when you do not have OPTION_END.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux