mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 07:33:25 +00:00
Fix potential use of uninitialized values
This commit is contained in:
parent
e781a0c52f
commit
34b320535b
@ -509,8 +509,10 @@ int git_packfile_resolve_header(
|
||||
git_packfile_stream_free(&stream);
|
||||
if (error < 0)
|
||||
return error;
|
||||
} else
|
||||
} else {
|
||||
*size_p = size;
|
||||
base_offset = 0;
|
||||
}
|
||||
|
||||
while (type == GIT_OBJ_OFS_DELTA || type == GIT_OBJ_REF_DELTA) {
|
||||
curpos = base_offset;
|
||||
|
@ -284,7 +284,7 @@ static int create_binary(
|
||||
size_t b_datalen)
|
||||
{
|
||||
git_buf deflate = GIT_BUF_INIT, delta = GIT_BUF_INIT;
|
||||
size_t delta_data_len;
|
||||
size_t delta_data_len = 0;
|
||||
int error;
|
||||
|
||||
/* The git_delta function accepts unsigned long only */
|
||||
|
@ -728,7 +728,7 @@ static int add_push_report_pkt(git_push *push, git_pkt *pkt)
|
||||
static int add_push_report_sideband_pkt(git_push *push, git_pkt_data *data_pkt, git_buf *data_pkt_buf)
|
||||
{
|
||||
git_pkt *pkt;
|
||||
const char *line, *line_end;
|
||||
const char *line, *line_end = NULL;
|
||||
size_t line_len;
|
||||
int error;
|
||||
int reading_from_buf = data_pkt_buf->size > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user