fix reading pack index files with large offsets (patch by Hiltjo Posthuma)
diff --git a/lib/pack.c b/lib/pack.c
index 06a6211..fdf067e 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -262,8 +262,8 @@ got_packidx_init_hdr(struct got_packidx *p, int verify)
if (p->map)
h->large_offsets = (uint64_t *)((uint8_t*)(p->map + offset));
else {
- h->offsets = malloc(nobj * sizeof(*h->large_offsets));
- if (h->offsets == NULL) {
+ h->large_offsets = malloc(nobj * sizeof(*h->large_offsets));
+ if (h->large_offsets == NULL) {
err = got_error_from_errno("malloc");
goto done;
}