Commit Diff


commit - 0fa332b53c81ad34f6e60bad94ce41e14d0bffab
commit + da30c05a101318828faf559ea66bc6ce1f638bc8
blob - 54605335e3cdf190211ea780d1041ad6a31647f0
blob + 1aa0ceaebb61ff5f5d563b41111c0e63ce2a9830
--- lib/pack_index.c
+++ lib/pack_index.c
@@ -243,12 +243,6 @@ read_packed_object(struct got_pack *pack, struct got_i
 		if (pack->map) {
 			if (mapoff + SHA1_DIGEST_LENGTH >= pack->filesize) {
 				err = got_error(GOT_ERR_BAD_PACKFILE);
-				break;
-			}
-			if (mapoff + SHA1_DIGEST_LENGTH > SIZE_MAX) {
-				err = got_error_fmt(GOT_ERR_RANGE,
-				    "mapoff %lld would overflow size_t",
-				    (long long)mapoff + SHA1_DIGEST_LENGTH);
 				break;
 			}
 			memcpy(obj->delta.ref.ref_id.sha1, pack->map + mapoff,