Windows: AFSRDFSProvider stack overrun
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 14 Dec 2011 04:28:15 +0000 (23:28 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 14 Dec 2011 14:16:23 +0000 (06:16 -0800)
commitda89855b492d8d06128ed62b219dc968f5b38a9d
treefef12d8ae549337ce0179d49817fd82b9394e28d
parent44045af35a6ae44880655115685e0755d6a0c828
Windows: AFSRDFSProvider stack overrun

StringCchXXX functions take the number of characters not
the number of bytes.   Use StringCbXXXX functions whenever the
buffer size is being specified.

Check return codes from StringXXXXXX functions and return errors
instead of blindly continuing with a truncated string.

Allocate a larger buffer for substitution strings since they
need to handle the device path plus the target path.

FIXES 130392

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