Merge branch 'jc/pack-bitmap-unaligned'
authorJunio C Hamano <gitster@pobox.com>
Fri, 30 Jun 2017 20:45:24 +0000 (13:45 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Jun 2017 20:45:24 +0000 (13:45 -0700)
An unaligned 32-bit access in pack-bitmap code ahs been corrected.

* jc/pack-bitmap-unaligned:
pack-bitmap: don't perform unaligned memory access

pack-bitmap.c
index a3ac3dccd4f8423fcd39ba0ee77a200500d75a81..327634cd71b5c8fdd5ab531493c2de020bee869d 100644 (file)
@@ -627,7 +627,7 @@ static void show_objects_for_type(
                        sha1 = nth_packed_object_sha1(bitmap_git.pack, entry->nr);
 
                        if (bitmap_git.hashes)
-                               hash = ntohl(bitmap_git.hashes[entry->nr]);
+                               hash = get_be32(bitmap_git.hashes + entry->nr);
 
                        show_reach(sha1, object_type, 0, hash, bitmap_git.pack, entry->offset);
                }