Skip to content

Commit c24783e

Browse files
committed
Merge branch 'ps/weak-sha1-for-tail-sum-fix' into next
* ps/weak-sha1-for-tail-sum-fix: ci: exercise unsafe OpenSSL backend builtin/fast-import: fix segfault with unsafe SHA1 backend bulk-checkin: fix segfault with unsafe SHA1 backend
2 parents 900c798 + 599a634 commit c24783e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

builtin/fast-import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ static void stream_blob(uintmax_t len, struct object_id *oidout, uintmax_t mark)
11061106
|| (pack_size + PACK_SIZE_THRESHOLD + len) < pack_size)
11071107
cycle_packfile();
11081108

1109-
the_hash_algo->init_fn(&checkpoint.ctx);
1109+
the_hash_algo->unsafe_init_fn(&checkpoint.ctx);
11101110
hashfile_checkpoint(pack_file, &checkpoint);
11111111
offset = checkpoint.offset;
11121112

bulk-checkin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static int deflate_blob_to_pack(struct bulk_checkin_packfile *state,
272272
OBJ_BLOB, size);
273273
the_hash_algo->init_fn(&ctx);
274274
the_hash_algo->update_fn(&ctx, obuf, header_len);
275-
the_hash_algo->init_fn(&checkpoint.ctx);
275+
the_hash_algo->unsafe_init_fn(&checkpoint.ctx);
276276

277277
/* Note: idx is non-NULL when we are writing */
278278
if ((flags & HASH_WRITE_OBJECT) != 0)

ci/run-build-and-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ linux-gcc)
1717
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
1818
;;
1919
linux-TEST-vars)
20+
export OPENSSL_SHA1_UNSAFE=YesPlease
2021
export GIT_TEST_SPLIT_INDEX=yes
2122
export GIT_TEST_MERGE_ALGORITHM=recursive
2223
export GIT_TEST_FULL_IN_PACK_ARRAY=true

0 commit comments

Comments
 (0)