git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH 0/3] limit the size of the packs we receive
Date: Tue, 16 Aug 2016 16:44:01 +0200	[thread overview]
Message-ID: <CAP8UFD0mhhfNbcsiOpLqJ-4ZWOkKwcoJ9k3yQyO4jTem=s+yBg@mail.gmail.com> (raw)
In-Reply-To: <20160816131145.apq77nc2x7wb7lba@sigill.intra.peff.net>

On Tue, Aug 16, 2016 at 3:11 PM, Jeff King <peff@peff.net> wrote:
> On Tue, Aug 16, 2016 at 10:16:58AM +0200, Christian Couder wrote:
>
>>   - changed strtoul() to strtoumax() in the first 2 patches, as
>>     suggested by Peff,
>>
>>   - changed git_config_ulong() to git_config_int64() and used PRIuMAX
>>     and uintmax_t in the last patch, as suggested by Peff,
>
> Thinking a bit, off_t is actually signed. So maybe PRIdMAX (which we
> don't seem to have compat macros for) would make more sense. I dunno if
> anybody actually cares. This value shouldn't be signed anyway, and
> nobody should be approaching the limits of a 64-bit number anyway (there
> is no point in limiting the incoming pack to the exabyte range).
>
> So I'm inclined not to worry about it.

Yeah, you previously wrote:

> We seem to use strtoumax() elsewhere, so that's probably a good match
> (technically it can overflow an off_t, but in practice this value comes from
> the admin and they will set something sane).

and I thought that the same would apply to using PRIuMAX and uintmax_t
in this patch.

I can add something along your explanations in the commit message if
it is prefered.

  reply	other threads:[~2016-08-16 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16  8:16 [PATCH 0/3] limit the size of the packs we receive Christian Couder
2016-08-16  8:16 ` [PATCH 1/3] index-pack: add --max-input-size=<size> option Christian Couder
2016-08-16  8:17 ` [PATCH 2/3] unpack-objects: " Christian Couder
2016-08-16  8:17 ` [PATCH 3/3] receive-pack: allow a maximum input size to be specified Christian Couder
2016-08-16 13:16   ` Jeff King
2016-08-16 14:27     ` Christian Couder
2016-08-16 16:21       ` Jeff King
2016-08-18 14:06         ` Christian Couder
2016-08-16 13:11 ` [PATCH 0/3] limit the size of the packs we receive Jeff King
2016-08-16 14:44   ` Christian Couder [this message]
2016-08-16 14:48     ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAP8UFD0mhhfNbcsiOpLqJ-4ZWOkKwcoJ9k3yQyO4jTem=s+yBg@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).