From: Jeffrey Altman Date: Tue, 24 Jul 2012 17:53:49 +0000 (-0400) Subject: Windows: Correct exceptions in AFSRDFSProvider X-Git-Tag: openafs-stable-1_8_0pre1~2162 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=16b671cf3bddfc1c8cd9f760f99320ac21e583ac;hp=78f1e230ce2b7167981e2f327bfdb5d50c94a95f Windows: Correct exceptions in AFSRDFSProvider Correct two errors in the generation of debug strings that were triggering invalid memory access exceptions. Change-Id: Ie5ee3289e2fa74809067f05931c3aa568c2be9d0 Reviewed-on: http://gerrit.openafs.org/7859 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/npdll/AFS_Npdll.c b/src/WINNT/afsrdr/npdll/AFS_Npdll.c index 6de7d53..d1a4886 100644 --- a/src/WINNT/afsrdr/npdll/AFS_Npdll.c +++ b/src/WINNT/afsrdr/npdll/AFS_Npdll.c @@ -3893,8 +3893,8 @@ NPFormatNetworkName( LPTSTR lpRemoteName, #ifdef AFS_DEBUG_TRACE AFSDbgPrint( L"NPFormatNetworkName Remote %s Flags %s (0x%x) CharsPerLine %u\n", lpRemoteName, - dwFlags, GetFormatFlags( dwFlags), + dwFlags, dwAveCharPerLine); #endif @@ -4292,7 +4292,7 @@ AFSDbgPrint( #endif GetCurrentThreadId()); - rc = StringCbVPrintfW( &wszbuffer[ 14], sizeof(wszbuffer) - 14, Format, marker); + rc = StringCbVPrintfW( &wszbuffer[ 14], sizeof(wszbuffer) - 14 * sizeof(WCHAR), Format, marker); if (SUCCEEDED(rc)) { if (debug & 1)