зеркало из https://github.com/microsoft/git.git
Merge branch 'jk/verify-packfile-gently' into maint
A low-level function verify_packfile() was meant to show errors that were detected without dying itself, but under some conditions it didn't and died instead, which has been fixed. * jk/verify-packfile-gently: verify_packfile: check pack validity before accessing data
This commit is contained in:
Коммит
6823506f36
|
@ -57,11 +57,8 @@ static int verify_packfile(struct packed_git *p,
|
|||
int err = 0;
|
||||
struct idx_entry *entries;
|
||||
|
||||
/* Note that the pack header checks are actually performed by
|
||||
* use_pack when it first opens the pack file. If anything
|
||||
* goes wrong during those checks then the call will die out
|
||||
* immediately.
|
||||
*/
|
||||
if (!is_pack_valid(p))
|
||||
return error("packfile %s cannot be accessed", p->pack_name);
|
||||
|
||||
git_SHA1_Init(&ctx);
|
||||
do {
|
||||
|
|
Загрузка…
Ссылка в новой задаче