From 16b671cf3bddfc1c8cd9f760f99320ac21e583ac Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 24 Jul 2012 13:53:49 -0400 Subject: [PATCH] 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 --- src/WINNT/afsrdr/npdll/AFS_Npdll.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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) -- 1.7.1