All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: Eric Wong <e@80x24.org>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Bagas Sanjaya <bagasdotme@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Jonathan Tan <jonathantanmy@google.com>
Subject: Re: [PATCH] treewide: fix various bugs w/ OpenSSL 3+ EVP API
Date: Fri, 1 Sep 2023 08:46:43 +0200	[thread overview]
Message-ID: <ZPGI02eZLmFGKCaE@ugly> (raw)
In-Reply-To: <20230901020928.M610756@dcvr>

On Fri, Sep 01, 2023 at 02:09:28AM +0000, Eric Wong wrote:
>@@ -1202,7 +1203,9 @@ static void parse_pack_objects(unsigned char *hash)
> 
> 	/* Check pack integrity */
> 	flush();
>+	the_hash_algo->init_fn(&tmp_ctx);
>
does it make sense (and doesn't it potentially even cause a leak) to 
init the target before cloning into it? at least the fallback simply 
memcpy()s over it.

>@@ -669,7 +670,9 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED)
> 	the_hash_algo->init_fn(&ctx);
> 	unpack_all();
> 	the_hash_algo->update_fn(&ctx, buffer, offset);
>+	the_hash_algo->init_fn(&tmp_ctx);
>
ditto

>+	the_hash_algo->clone_fn(&tmp_ctx, &ctx);
>+	the_hash_algo->final_oid_fn(&oid, &tmp_ctx);

regards

  parent reply	other threads:[~2023-09-01  6:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 12:47 [REGRESSION] Can't clone GitHub repos (fetch-pack error) due to avoiding deprecated OpenSSL SHA-1 routines Bagas Sanjaya
2023-08-31 23:19 ` brian m. carlson
2023-09-01  0:57   ` Eric Wong
2023-09-01  2:09     ` [PATCH] treewide: fix various bugs w/ OpenSSL 3+ EVP API Eric Wong
2023-09-01  5:32       ` Junio C Hamano
2023-09-01  6:46       ` Oswald Buddenhagen [this message]
2023-09-01 11:02       ` Bagas Sanjaya
2023-09-01 11:09   ` [REGRESSION] Can't clone GitHub repos (fetch-pack error) due to avoiding deprecated OpenSSL SHA-1 routines Bagas Sanjaya

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=ZPGI02eZLmFGKCaE@ugly \
    --to=oswald.buddenhagen@gmx.de \
    --cc=bagasdotme@gmail.com \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonathantanmy@google.com \
    --cc=sandals@crustytoothpaste.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.