commit - 1bb2bba217ad222aed1d79baf9d8025110130bd3
commit + c26ee7add64b80ff74fa5d22df886393a52f9b41
blob - b28458e490517b2cfd9cbb4920208ef0f109182e
blob + ececeecbfe2204f148096c913a860427197e878a
--- lib/privsep.c
+++ lib/privsep.c
size_t len = sizeof(iobj);
struct ibuf *wbuf;
+ memset(&iobj, 0, sizeof(iobj));
iobj.hdrlen = hdrlen;
iobj.size = size;
void *data;
size_t len;
+ memset(&iobj, 0, sizeof(iobj));
if (pack_idx != -1) { /* commit is packed */
iobj.idx = pack_idx;
memcpy(iobj.id, id->sha1, sizeof(iobj.id));
void *data;
size_t len;
+ memset(&iobj, 0, sizeof(iobj));
if (pack_idx != -1) { /* tag is packed */
iobj.idx = pack_idx;
memcpy(iobj.id, id->sha1, sizeof(iobj.id));
void *data;
size_t len;
+ memset(&iobj, 0, sizeof(iobj));
if (pack_idx != -1) { /* blob is packed */
iobj.idx = pack_idx;
memcpy(iobj.id, id->sha1, sizeof(iobj.id));
struct got_imsg_tree_entries ientries;
int i;
+ memset(&ientries, 0, sizeof(ientries));
+
wbuf = imsg_create(ibuf, GOT_IMSG_TREE_ENTRIES, 0, 0, len);
if (wbuf == NULL)
return got_error_from_errno("imsg_create TREE_ENTRY");
const struct got_error *err = NULL;
struct got_imsg_tree_object itree;
+ memset(&itree, 0, sizeof(itree));
itree.nentries = nentries;
if (imsg_compose(ibuf, GOT_IMSG_TREE, 0, 0, -1, &itree, sizeof(itree))
== -1)
{
struct got_imsg_blob iblob;
+ memset(&iblob, 0, sizeof(iblob));
iblob.size = size;
iblob.hdrlen = hdrlen;
struct got_imsg_pack ipack;
int fd;
+ memset(&ipackidx, 0, sizeof(ipackidx));
+ memset(&ipack, 0, sizeof(ipack));
+
ipackidx.len = packidx->len;
ipackidx.packfile_size = pack->filesize;
fd = dup(packidx->fd);
{
struct got_imsg_packed_object iobj;
+ memset(&iobj, 0, sizeof(iobj));
iobj.idx = idx;
memcpy(iobj.id, id->sha1, sizeof(iobj.id));
{
struct got_imsg_packed_object iobj;
+ memset(&iobj, 0, sizeof(iobj));
iobj.idx = idx;
memcpy(iobj.id, id->sha1, sizeof(iobj.id));
{
struct got_imsg_raw_delta_request dreq;
+ memset(&dreq, 0, sizeof(dreq));
dreq.idx = idx;
memcpy(dreq.id, id->sha1, SHA1_DIGEST_LENGTH);
struct got_imsg_raw_delta idelta;
int ret;
+ memset(&idelta, 0, sizeof(idelta));
idelta.base_size = base_size;
idelta.result_size = result_size;
idelta.delta_size = delta_size;
struct ibuf *wbuf;
size_t i;
+ memset(&idlist, 0, sizeof(idlist));
+
if (nids > GOT_IMSG_OBJ_ID_LIST_MAX_NIDS)
return got_error(GOT_ERR_NO_SPACE);
struct got_imsg_reused_deltas ideltas;
size_t i;
+ memset(&ideltas, 0, sizeof(ideltas));
+
if (ndeltas > GOT_IMSG_REUSED_DELTAS_MAX_NDELTAS)
return got_error(GOT_ERR_NO_SPACE);