From: Junio C Hamano Date: Fri, 30 Jun 2017 20:45:24 +0000 (-0700) Subject: Merge branch 'jc/pack-bitmap-unaligned' X-Git-Tag: v2.14.0-rc0~42 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ca069a3c5ce86303865cf49260ab8f4ff758d1d8?ds=inline;hp=-c Merge branch 'jc/pack-bitmap-unaligned' An unaligned 32-bit access in pack-bitmap code ahs been corrected. * jc/pack-bitmap-unaligned: pack-bitmap: don't perform unaligned memory access --- ca069a3c5ce86303865cf49260ab8f4ff758d1d8 diff --combined pack-bitmap.c index a3ac3dccd4,09de9ba312..327634cd71 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@@ -266,7 -266,7 +266,7 @@@ static int open_pack_bitmap_1(struct pa return -1; idx_name = pack_bitmap_filename(packfile); - fd = git_open_noatime(idx_name); + fd = git_open(idx_name); free(idx_name); if (fd < 0) @@@ -627,7 -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); } @@@ -673,7 -673,7 +673,7 @@@ int prepare_bitmap_walk(struct rev_inf struct object *object = pending_e[i].item; if (object->type == OBJ_NONE) - parse_object_or_die(object->oid.hash, NULL); + parse_object_or_die(&object->oid, NULL); while (object->type == OBJ_TAG) { struct tag *tag = (struct tag *) object; @@@ -685,7 -685,7 +685,7 @@@ if (!tag->tagged) die("bad tag"); - object = parse_object_or_die(tag->tagged->oid.hash, NULL); + object = parse_object_or_die(&tag->tagged->oid, NULL); } if (object->flags & UNINTERESTING)