mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
daemon: Fix use of uninitialized stack data (found by valgrind).
This uninitialized data was also sent over the protocol, potentially being a serious information leak.
This commit is contained in:
@@ -263,6 +263,7 @@ send_error (int errnum, const char *msg)
|
||||
|
||||
xdrmem_create (&xdr, buf, sizeof buf, XDR_ENCODE);
|
||||
|
||||
memset (&hdr, 0, sizeof hdr);
|
||||
hdr.prog = GUESTFS_PROGRAM;
|
||||
hdr.vers = GUESTFS_PROTOCOL_VERSION;
|
||||
hdr.direction = GUESTFS_DIRECTION_REPLY;
|
||||
@@ -315,6 +316,7 @@ reply (xdrproc_t xdrp, char *ret)
|
||||
|
||||
xdrmem_create (&xdr, buf, sizeof buf, XDR_ENCODE);
|
||||
|
||||
memset (&hdr, 0, sizeof hdr);
|
||||
hdr.prog = GUESTFS_PROGRAM;
|
||||
hdr.vers = GUESTFS_PROTOCOL_VERSION;
|
||||
hdr.direction = GUESTFS_DIRECTION_REPLY;
|
||||
|
||||
Reference in New Issue
Block a user