commit 1bb2bba217ad222aed1d79baf9d8025110130bd3 from: Omar Polo via: Thomas Adam date: Thu Jun 23 14:09:35 2022 UTC zero the whole struct got_imsg_object before sending it otherwise some fields may be unitialized and fail the validation done on the receiving side. ok stsp@ commit - 9ec06ae8011dfdee2d415e1a81635f63e1a68edc commit + 1bb2bba217ad222aed1d79baf9d8025110130bd3 blob - be6ae676b6fc81f4cab272177fa09847454acc69 blob + b28458e490517b2cfd9cbb4920208ef0f109182e --- lib/privsep.c +++ lib/privsep.c @@ -529,6 +529,8 @@ const struct got_error * got_privsep_send_obj(struct imsgbuf *ibuf, struct got_object *obj) { struct got_imsg_object iobj; + + memset(&iobj, 0, sizeof(iobj)); memcpy(iobj.id, obj->id.sha1, sizeof(iobj.id)); iobj.type = obj->type;