From: Jeffrey Altman Date: Mon, 19 Sep 2011 14:35:11 +0000 (-0400) Subject: Fix input size computation in SetSPrefs pioctl X-Git-Tag: upstream/1.8.0_pre1^2~3250 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=552d59186b135af55eeaa6136a9cbb8965dd2f04;p=packages%2Fo%2Fopenafs.git Fix input size computation in SetSPrefs pioctl Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained a small typo that prevents the SetSPrefs pioctl processing from functioning in all cases. fs setserverprefs continues to work for non-DB preference lists because fs.c pokeServers() attempts to try the old SetSPrefs33 pioctl in the non-DB server case. Change-Id: I2e06dccb51c53ba312418fb5f51be3d621a2004c Reviewed-on: http://gerrit.openafs.org/5465 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 2d46ac242..cf432d621 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -4022,7 +4022,7 @@ DECL_PIOCTL(PSetSPrefs) ssp = (struct setspref *)ainPtr; if (ainSize < (sizeof(struct setspref) - + sizeof(struct spref) * ssp->num_servers-1)) + + sizeof(struct spref) * (ssp->num_servers-1))) return EINVAL; afs_setsprefs(&(ssp->servers[0]), ssp->num_servers,