git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a11cb4a
)
Don't die if reply message is oversized (RHBZ#509597).
author
Richard Jones
<rjones@trick.home.annexia.org>
Sun, 5 Jul 2009 15:04:50 +0000
(16:04 +0100)
committer
Richard Jones
<rjones@trick.home.annexia.org>
Sun, 5 Jul 2009 15:06:36 +0000
(16:06 +0100)
daemon/proto.c
patch
|
blob
|
history
diff --git
a/daemon/proto.c
b/daemon/proto.c
index
62871b5
..
acd6601
100644
(file)
--- a/
daemon/proto.c
+++ b/
daemon/proto.c
@@
-266,9
+266,14
@@
reply (xdrproc_t xdrp, char *ret)
}
if (xdrp) {
}
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)) {
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;
}
}
}
}