diff options
| author | Jeff King <peff@peff.net> | 2025-01-19 08:23:44 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-01-21 08:42:55 -0800 |
| commit | 4f02f4d68d8eefe728008974640839ef6e1b2182 (patch) | |
| tree | 5b6b89d7336b98bc7e9466258dab38b3da71c03d /builtin/index-pack.c | |
| parent | 798e0f451661f81f4568dce4033cf1c9076f224f (diff) | |
parse_pack_header_option(): avoid unaligned memory writes
In order to recreate a pack header in our in-memory buffer, we cast the
buffer to a "struct pack_header" and assign the individual fields. This
is reported to cause SIGBUS on sparc64 due to alignment issues.
We can work around this by using put_be32() which will write individual
bytes into the buffer.
Reported-by: Koakuma <koachan@protonmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/index-pack.c')
0 files changed, 0 insertions, 0 deletions
