Re: [PATCH] treewide: fix various bugs w/ OpenSSL 3+ EVP API
- From
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
- Date
- Sep 1, 2023, 06:46 UTC
- Message-ID
- <ZPGI02eZLmFGKCaE@ugly>
- In-Reply-To
- <20230901020928.M610756@dcvr>
On Fri, Sep 01, 2023 at 02:09:28AM +0000, Eric Wong wrote:
Show 6 quoted lines
>@@ -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.
Show 6 quoted lines
>@@ -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