From: Simon Wilkinson Date: Thu, 19 May 2011 17:56:27 +0000 (+0100) Subject: vlserver: Use correct memsets in vlentry convertor X-Git-Tag: upstream/1.8.0_pre1^2~3695 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=90507fcb104313154679f89ac22c1947c713a65d;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/vlserver/vlprocs.c b/src/vlserver/vlprocs.c index 97419647d..19186c906 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)