Re: [PATCH v4 2/5] t5000: test tar files that overflow ustar headers
- From
Jeff King <peff@peff.net>
- Date
- Jul 14, 2016, 20:14 UTC
- Message-ID
- <20160714201423.GB18372@sigill.intra.peff.net>
- In-Reply-To
- <xmqqoa60oulk.fsf@gitster.mtv.corp.google.com>
On Thu, Jul 14, 2016 at 01:03:35PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > OK, how about this on top of a replacement for js/t0006-for-v2.9.2 > > that I'll send out as a reply to this message? > > which is this one, which is largely from your $gmane/299310.
Mostly OK, but two minor nits:
Show 14 quoted lines
> diff --git a/help.c b/help.c
> index 19328ea..0cea240 100644
> --- a/help.c
> +++ b/help.c
> @@ -419,6 +419,13 @@ int cmd_version(int argc, const char **argv, const char *prefix)
> * with external projects that rely on the output of "git version".
> */
> printf("git version %s\n", git_version_string);
> + while (*++argv) {
> + if (!strcmp(*argv, "--build-options")) {
> + printf("sizeof-unsigned-long: %d",
> + (int)sizeof(unsigned long));
> + /* maybe also save and output GIT-BUILD_OPTIONS? */
> + }That comment was mostly for explaining my mindset in the discussion. If we're going to keep it, maybe mark it with a TODO or XXX or something?
> +test_lazy_prereq 64BIT ' > + test 8 -le "$(build_option sizeof-unsigned-long)" > +'
As mentioned in my previous email, I wonder if this should be UL64 or something.
As noted earlier in the thread, t0006 actually cares most directly about LONG_MAX, but I think it's probably OK to assume it is directly related to "unsigned long". Also, even if we got past that initial "strtol", I suspect "unsigned long" _would_ come into play anyway, as that is our internal representation.
-Peff