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
This commit is contained in:
@ -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;
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user