Windows: NPCancelConnection set correct length

The RemoteNameLength passed in the IOCTL_AFS_CANCEL_CONNECTION call
must not include the trailing NUL.  NPGetConnection() returns the
size of the buffer used which does include the trailing NUL.

Change-Id: Ic5eae51aade91db4a799bea83d898af6fbc37504
Reviewed-on: http://gerrit.openafs.org/5806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2011-11-04 09:34:53 -04:00 committed by Jeffrey Altman
parent 3acd9b854e
commit da00d719a7

View File

@ -912,6 +912,11 @@ NPCancelConnection( LPWSTR lpName,
#endif
try_return( dwStatus = WN_NOT_CONNECTED);
}
//
// NPGetConnection returns the buffer size not the length without NUL
//
dwRemoteNameLength -= sizeof( WCHAR);
}
else
{