Commit Diff
- Commit:
1bb2bba217ad222aed1d79baf9d8025110130bd3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
- Message:
- 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@
- Actions:
- Patch | Tree
--- 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;