search for: xdr_guestfs_mount_args

Displaying 1 result from an estimated 1 matches for "xdr_guestfs_mount_args".

2012 Feb 13
0
[PATCH] daemon: Don't xdr_free uninitialized args struct on error paths.
...f functions that had arguments, code did this: static void mount_stub (XDR *xdr_in) { int r; struct guestfs_mount_args args; if (optargs_bitmask != 0) { //... goto done; } // possibly other tests here memset (&args, 0, sizeof args); [...] done: xdr_free ((xdrproc_t) xdr_guestfs_mount_args, (char *) &args); return; } This caused xdr_free to be called on uninitialized 'args' struct, causing a segfault. The fix is to add another label, so the code looks like: static void mount_stub (XDR *xdr_in) { int r; struct guestfs_mount_args args; if (optargs_bitmask != 0)...