mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 21:25:35 +00:00
odb_pack: initialize git_rawobj
structure
The `pack_entry_find_prefix` function receives a `git_rawobj` structure as argument. While the function first initializes the structure to a sensible state, Coverity is unable to correctly detect this, resulting in a warning. Fix this warning by initializing the object to all-zeroes before passing it to the function.
This commit is contained in:
parent
2cf48e1326
commit
8d452448bb
@ -428,7 +428,7 @@ static int pack_backend__read_prefix(
|
|||||||
git_oid_cpy(out_oid, short_oid);
|
git_oid_cpy(out_oid, short_oid);
|
||||||
} else {
|
} else {
|
||||||
struct git_pack_entry e;
|
struct git_pack_entry e;
|
||||||
git_rawobj raw;
|
git_rawobj raw = {NULL};
|
||||||
|
|
||||||
if ((error = pack_entry_find_prefix(
|
if ((error = pack_entry_find_prefix(
|
||||||
&e, (struct pack_backend *)backend, short_oid, len)) == 0 &&
|
&e, (struct pack_backend *)backend, short_oid, len)) == 0 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user