mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 23:54:50 +00:00
pack-objects: check realloc in try_delta with GITERR_CHECK_ALLOC
This commit is contained in:
parent
2129d6df93
commit
d1c9a48df6
@ -850,9 +850,11 @@ static int try_delta(git_packbuilder *pb, struct unpacked *trg,
|
|||||||
|
|
||||||
git_packbuilder__cache_unlock(pb);
|
git_packbuilder__cache_unlock(pb);
|
||||||
|
|
||||||
if (overflow ||
|
if (overflow)
|
||||||
!(trg_object->delta_data = git__realloc(delta_buf, delta_size)))
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
trg_object->delta_data = git__realloc(delta_buf, delta_size);
|
||||||
|
GITERR_CHECK_ALLOC(trg_object->delta_data);
|
||||||
} else {
|
} else {
|
||||||
/* create delta when writing the pack */
|
/* create delta when writing the pack */
|
||||||
git_packbuilder__cache_unlock(pb);
|
git_packbuilder__cache_unlock(pb);
|
||||||
|
Loading…
Reference in New Issue
Block a user