mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Don't die if reply message is oversized (RHBZ#509597).
This commit is contained in:
@@ -266,9 +266,14 @@ reply (xdrproc_t xdrp, char *ret)
|
||||
}
|
||||
|
||||
if (xdrp) {
|
||||
/* This can fail if the reply body is too large, for example
|
||||
* if it exceeds the maximum message size. In that case
|
||||
* we want to return an error message instead. (RHBZ#509597).
|
||||
*/
|
||||
if (!(*xdrp) (&xdr, ret)) {
|
||||
fprintf (stderr, "guestfsd: failed to encode reply body\n");
|
||||
exit (1);
|
||||
reply_with_perror ("guestfsd: failed to encode reply body\n");
|
||||
xdr_destroy (&xdr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user