summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeli-Matti Lintu <veli-matti.lintu@opinsys.fi>2014-06-01 13:08:35 -0400
committerSteve Dickson <steved@redhat.com>2014-06-01 13:10:02 -0400
commitfb490bdcb302a56d8513ae854c3caec950bdf071 (patch)
tree8430483a12f90ce7e2ed4f7691050225e066348c
parenta126e718ab931963ca877fd11203f873fd50811f (diff)
downloadnfs-utils-fb490bdcb302a56d8513ae854c3caec950bdf071.tar.gz
nfs-utils-fb490bdcb302a56d8513ae854c3caec950bdf071.tar.xz
nfs-utils-fb490bdcb302a56d8513ae854c3caec950bdf071.zip
gssd: Fix allocated buffer size for the scraped acceptor name in do_downcall
In commit 51fda07a "gssd: scrape the acceptor name out of the context" the allocated buffer size is not large enough to hold the actual data that is written to the buffer. This fixes the allocated buffer size. Reviewed-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: Veli-Matti Lintu <veli-matti.lintu@opinsys.fi> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/gssd/gssd_proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
index 69bb3c6..40ff188 100644
--- a/utils/gssd/gssd_proc.c
+++ b/utils/gssd/gssd_proc.c
@@ -696,7 +696,7 @@ do_downcall(int k5_fd, uid_t uid, struct authgss_private_data *pd,
buf_size = sizeof(uid) + sizeof(timeout) + sizeof(pd->pd_seq_win) +
sizeof(pd->pd_ctx_hndl.length) + pd->pd_ctx_hndl.length +
sizeof(context_token->length) + context_token->length +
- acceptor->length;
+ sizeof(acceptor->length) + acceptor->length;
p = buf = malloc(buf_size);
if (!buf)
goto out_err;