From: Thomas Rast <trast@inf.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thomas Rast <trast@student.ethz.ch>, <git@vger.kernel.org>
Subject: Re: [PATCH 4/4] bundle: keep around names passed to add_pending_object()
Date: Thu, 1 Mar 2012 23:22:21 +0100 [thread overview]
Message-ID: <87obsggdwh.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <7vehtckmee.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 01 Mar 2012 14:05:13 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> Thomas Rast <trast@student.ethz.ch> writes:
>
>> The 'name' field passed to add_pending_object() is used to later
>> deduplicate in object_array_remove_duplicates().
>>
>> git-bundle had a bug in this area since 18449ab (git-bundle: avoid
>> packing objects which are in the prerequisites, 2007-03-08): it passed
>> the name of each boundary object in a static buffer. In other words,
>> all that object_array_remove_duplicates() saw was the name of the
>> *last* added boundary object.
>
> Ouch.
Actually, I just noticed that object_array_remove_duplicates() is much
newer than 18449ab, from b2a6d1c (bundle: allow the same ref to be given
more than once, 2009-01-17). However it did pass in the same buffer all
the time starting from 18449ab, which is a bug waiting to happen (and
perhaps NULL would have been more appropriate).
Archaeology sure is fun.
--
Thomas Rast
trast@{inf,student}.ethz.ch
prev parent reply other threads:[~2012-03-01 22:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 21:40 [PATCH 0/4] Another bundle fix: reading freed memory Thomas Rast
2012-03-01 21:40 ` [PATCH 1/4] t5510: refactor bundle->pack conversion Thomas Rast
2012-03-01 21:40 ` [PATCH 2/4] t5510: fix indent with spaces Thomas Rast
2012-03-01 21:40 ` [PATCH 3/4] t5510: ensure we stay in the toplevel test dir Thomas Rast
2012-03-01 21:57 ` Junio C Hamano
2012-03-01 22:09 ` Thomas Rast
2012-03-01 22:32 ` Junio C Hamano
2012-03-01 22:33 ` Junio C Hamano
2012-03-01 21:40 ` [PATCH 4/4] bundle: keep around names passed to add_pending_object() Thomas Rast
2012-03-01 22:05 ` Junio C Hamano
2012-03-01 22:22 ` Thomas Rast [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=87obsggdwh.fsf@thomas.inf.ethz.ch \
--to=trast@inf.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=trast@student.ethz.ch \
/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;
as well as URLs for NNTP newsgroup(s).