Windows: Fix cm_IoctlSkipQueryOptions buffer management
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 3 Jun 2010 15:49:14 +0000 (11:49 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Thu, 3 Jun 2010 22:57:58 +0000 (15:57 -0700)
When cm_IoctlSkipQueryOptions advances the input buffer
pointer it must also reduce the available input length.

LICENSE MIT

Change-Id: I4e0d673e3ff5d8621e715d33d73616a22211a8a9
Reviewed-on: http://gerrit.openafs.org/2076
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_ioctl.c

index 12f9243..2b3bde0 100644 (file)
@@ -304,6 +304,7 @@ cm_IoctlSkipQueryOptions(struct cm_ioctl *ioctlp, struct cm_user *userp)
 {
     cm_ioctlQueryOptions_t * optionsp = (cm_ioctlQueryOptions_t *)ioctlp->inDatap;
     ioctlp->inDatap += optionsp->size;
+    ioctlp->inCopied -= optionsp->size;
 }
 
 /* format the specified path to look like "/afs/<cellname>/usr", by