Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-05 00:45:46 +0300
committerJunio C Hamano <gitster@pobox.com>2016-03-05 00:45:47 +0300
commit090de6b289ff2d9fc1c82ef85069bd6cba296d63 (patch)
tree3b609b0a9989a67abcc8449f80e6626d48f73509 /builtin
parentbc0ffd41b92c8539fc7dbe27f256d8bae6b28d05 (diff)
parent7465feba513a8bd3d47f27630ccc9ab7e82d916c (diff)
Merge branch 'jk/pack-idx-corruption-safety'
The code to read the pack data using the offsets stored in the pack idx file has been made more carefully check the validity of the data in the idx. * jk/pack-idx-corruption-safety: sha1_file.c: mark strings for translation use_pack: handle signed off_t overflow nth_packed_object_offset: bounds-check extended offset t5313: test bounds-checks of corrupted/malicious pack/idx files
Diffstat (limited to 'builtin')
-rw-r--r--builtin/index-pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 193908a619..45245199ae 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1514,6 +1514,7 @@ static void read_v2_anomalous_offsets(struct packed_git *p,
if (!(off & 0x80000000))
continue;
off = off & 0x7fffffff;
+ check_pack_index_ptr(p, &idx2[off * 2]);
if (idx2[off * 2])
continue;
/*