Commit Diff


commit - 9f4f302a43f7e186910d59f9dbe0f839b6f2d565
commit + 0e90588fc653d9ef0965c9420e8c39f615393b0d
blob - ac2b6971ec3271d407595f9e74e87c6648a403ee
blob + 07b64ca6e1b938a8bcab156f09eb337405c2977a
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -1355,6 +1355,9 @@ enumeration_request(struct imsg *imsg, struct imsgbuf 
 				free(buf);
 				goto done;
 			}
+			idx = got_packidx_get_object_idx(packidx, &tag->id);
+			if (idx == -1)
+				break;
 			err = open_commit(&commit, pack, packidx, idx,
 			    &tag->id, objcache);
 			got_object_tag_close(tag);