Windows: DriveSubstitution handle too small buffer
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 25 Jan 2012 16:27:39 +0000 (11:27 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 27 Jan 2012 00:11:28 +0000 (16:11 -0800)
commit1161d5fc3cde5e15cb2d13f01ff225710fc04766
tree62f8c4366e322848a3d77a7589b18971fc589940
parent3d10edc2d49e0e1c7a7a67c538a932347a91504c
Windows: DriveSubstitution handle too small buffer

If the buffer passed to DriveSubstitution is too small the
resulting file path will end up being truncated.  At the very
least log the fact that truncation is occurring.  In addition
return the fact that truncation occurred to the caller.

In NPGetUniversalName allocate a 4K buffer on the heap instead
of calculating a buffer based on the local name buffer size.
The local name buffer size has no relationship with the required
buffer size for the expanded unc or device path.

FIXES 130548

Change-Id: I86fbb9db4aa6a438dbb5e793678ec52283d5546b
Reviewed-on: http://gerrit.openafs.org/6618
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/npdll/AFS_Npdll.c