From 90507fcb104313154679f89ac22c1947c713a65d Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 19 May 2011 18:56:27 +0100 Subject: [PATCH] vlserver: Use correct memsets in vlentry convertor The various vlentry_to_ conversion functions have obviously been copy and pasted from each other. However, the size of the structure which is being zeroed has not been updated when we are zeroing different structures. Fix this, so that we always clear all of the structure that we are filling. Change-Id: Ic822e1d2b17494574074c332c7680e94d4701c66 Reviewed-on: http://gerrit.openafs.org/4773 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/vlserver/vlprocs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vlserver/vlprocs.c b/src/vlserver/vlprocs.c index 97419647d4..19186c9062 100644 --- a/src/vlserver/vlprocs.c +++ b/src/vlserver/vlprocs.c @@ -3060,7 +3060,7 @@ vlentry_to_nvldbentry(struct vl_ctx *ctx, struct nvlentry *VlEntry, { int i, j; - memset(VldbEntry, 0, sizeof(struct vldbentry)); + memset(VldbEntry, 0, sizeof(struct nvldbentry)); strncpy(VldbEntry->name, VlEntry->name, sizeof(VldbEntry->name)); for (i = 0; i < NMAXNSERVERS; i++) { if (VlEntry->serverNumber[i] == BADSERVERID) @@ -3099,7 +3099,7 @@ vlentry_to_uvldbentry(struct vl_ctx *ctx, struct nvlentry *VlEntry, { int i, j; - memset(VldbEntry, 0, sizeof(struct vldbentry)); + memset(VldbEntry, 0, sizeof(struct uvldbentry)); strncpy(VldbEntry->name, VlEntry->name, sizeof(VldbEntry->name)); for (i = 0; i < NMAXNSERVERS; i++) { if (VlEntry->serverNumber[i] == BADSERVERID)