From: Derrick Stolee <stolee@gmail.com>
To: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH 3/6] tree-walk: use size_t consistently
Date: Thu, 1 Aug 2019 14:17:28 -0400
Message-ID: <b99561c9-cd7c-aca0-c7dd-a9916b7bd429@gmail.com> (raw)
In-Reply-To: <20190731043818.GC27170@sigill.intra.peff.net>
On 7/31/2019 12:38 AM, Jeff King wrote:
> We store and manipulate the cumulative traverse_info.pathlen as an
> "int", which can overflow when we are fed ridiculously long pathnames
> (e.g., ones at the edge of 2GB or 4GB, even if the individual tree entry
> names are smaller than that). The results can be confusing, though
> after some prodding I was not able to use this integer overflow to cause
> an under-allocated buffer.
>
> Let's consistently use size_t to generarate and store these, and make
> sure our addition doesn't overflow.
nit: s/generarate/generate
-Stolee
next prev parent reply other threads:[~2019-08-01 18:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 4:37 [PATCH 0/6] harden tree-walking against integer overflow Jeff King
2019-07-31 4:38 ` [PATCH 1/6] setup_traverse_info(): stop copying oid Jeff King
2019-07-31 4:38 ` [PATCH 2/6] tree-walk: drop oid from traverse_info Jeff King
2019-07-31 4:38 ` [PATCH 3/6] tree-walk: use size_t consistently Jeff King
2019-08-01 18:17 ` Derrick Stolee [this message]
2019-07-31 4:38 ` [PATCH 4/6] tree-walk: accept a raw length for traverse_path_len() Jeff King
2019-07-31 4:38 ` [PATCH 5/6] tree-walk: add a strbuf wrapper for make_traverse_path() Jeff King
2019-07-31 4:38 ` [PATCH 6/6] tree-walk: harden make_traverse_path() length computations 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=b99561c9-cd7c-aca0-c7dd-a9916b7bd429@gmail.com \
--to=stolee@gmail.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
git@vger.kernel.org list mirror (unofficial, one of many)
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://public-inbox.org/git
git clone --mirror http://ou63pmih66umazou.onion/git
git clone --mirror http://czquwvybam4bgbro.onion/git
git clone --mirror http://hjrcffqmbrq6wope.onion/git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 git git/ https://public-inbox.org/git \
git@vger.kernel.org
public-inbox-index git
Example config snippet for mirrors.
Newsgroups are available over NNTP:
nntp://news.public-inbox.org/inbox.comp.version-control.git
nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
nntp://news.gmane.io/gmane.comp.version-control.git
note: .onion URLs require Tor: https://www.torproject.org/
code repositories for the project(s) associated with this inbox:
https://80x24.org/mirrors/git.git
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git