Windows: NPCancelConnection set correct length
[openafs.git] / src / WINNT / afsrdr / npdll / AFS_Npdll.c
index 56e9ef1..9b889be 100644 (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
         {