All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] dir.c: skip .gitignore, etc larger than INT_MAX
Date: Fri, 31 May 2024 08:05:03 -0700	[thread overview]
Message-ID: <xmqqh6eehvj4.fsf@gitster.g> (raw)
In-Reply-To: <20240531120034.GA442032@coredump.intra.peff.net> (Jeff King's message of "Fri, 31 May 2024 08:00:34 -0400")

Jeff King <peff@peff.net> writes:

> The "int" in question is in add_patterns_from_buffer(), so we could
> catch it there. But by putting the checks in its two callers, we can
> produce more useful error messages.

Nice trick.  I wondered if we want INT_MAX/2 or something even
lower, but because once these things are read, we only parse the
contents so allowing up to INT_MAX is fine.  It is not like we read
this and that and concatenate them into a larger buffer.

  reply	other threads:[~2024-05-31 15:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 12:00 [PATCH] dir.c: skip .gitignore, etc larger than INT_MAX Jeff King
2024-05-31 15:05 ` Junio C Hamano [this message]
2024-06-04 10:39   ` Jeff King
2024-06-04 17:45     ` Junio C Hamano
2024-06-05  8:03       ` Jeff King
2024-06-05 16:23         ` Junio C Hamano
2024-05-31 15:10 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh6eehvj4.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.