From: Junio C Hamano <gitster@pobox.com>
To: Elia Pinto <gitter.spiros@gmail.com>
Cc: git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v2 5/5] notes: avoid truncating the size of concatenated notes
Date: Tue, 17 Nov 2026 15:01:51 -0800 [thread overview]
Message-ID: <xmqqjymbawps.fsf@gitster.g> (raw)
In-Reply-To: <04f320d1de82902c174ff300426815125e1054c9.1794914210.git.gitter.spiros@gmail.com> (Elia Pinto's message of "Tue, 17 Nov 2026 12:38:58 +0100")
Elia Pinto <gitter.spiros@gmail.com> writes:
> Compute the size as a size_t with st_add3(), and go through
> cast_size_t_to_ulong() when passing it to odb_write_object(), whose
> length parameter is still an "unsigned long". That makes us die on such
> platforms instead of writing a truncated blob, until the write API
> learns about size_t, too.
Nice to see use of st_addN() family of functions while we convert
ulong to size_t.
Looking good.
prev parent reply other threads:[~2026-11-17 23:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 10:28 [PATCH 0/6] loose object size checks and a few size truncations Elia Pinto
2026-10-30 10:28 ` [PATCH 1/6] object-file: check size of inflated loose object against its header Elia Pinto
2026-10-30 10:28 ` [PATCH 2/6] object-file: use size_t for loose object sizes Elia Pinto
2026-10-30 10:28 ` [PATCH 3/6] odb/source-loose: check object size when streaming loose objects Elia Pinto
2026-10-30 10:28 ` [PATCH 4/6] cat-file: use size_t for the length passed to batch_write() Elia Pinto
2026-10-30 10:28 ` [PATCH 5/6] notes: avoid truncating the size of concatenated notes Elia Pinto
2026-10-30 10:28 ` [PATCH 6/6] diff: use size_t in count_trailing_blank() Elia Pinto
2026-11-17 11:38 ` [PATCH v2 0/5] loose object size checks and a few size truncations Elia Pinto
2026-11-17 11:38 ` [PATCH v2 1/5] object-file: check size of inflated loose object against its header Elia Pinto
2026-11-17 19:33 ` Junio C Hamano
2026-11-17 11:38 ` [PATCH v2 2/5] object-file: use size_t for loose object sizes Elia Pinto
2026-11-17 22:34 ` Junio C Hamano
2026-11-17 11:38 ` [PATCH v2 3/5] odb/source-loose: check object size when streaming loose objects Elia Pinto
2026-11-17 22:55 ` Junio C Hamano
2026-11-17 11:38 ` [PATCH v2 4/5] cat-file: use size_t for the length passed to batch_write() Elia Pinto
2026-11-17 22:59 ` Junio C Hamano
2026-11-17 11:38 ` [PATCH v2 5/5] notes: avoid truncating the size of concatenated notes Elia Pinto
2026-11-17 23:01 ` Junio C Hamano [this message]
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=xmqqjymbawps.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitter.spiros@gmail.com \
--cc=ps@pks.im \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox