Index: /trunk/src/VBox/Devices/Audio/AudioMixer.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 82457)
+++ /trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 82458)
@@ -1445,5 +1445,5 @@
             RTStrPrintf(szName, sizeof(szName), "MixerSink-%s", pSink->pszName);
 
-            char szFile[RTPATH_MAX + 1];
+            char szFile[RTPATH_MAX];
             rc2 = DrvAudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), szTemp, szName,
                                          0 /* Instance */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);
Index: /trunk/src/VBox/Devices/Audio/DrvAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 82457)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 82458)
@@ -2547,11 +2547,10 @@
         pStream->cRefs = 1;
 
+        char szFile[RTPATH_MAX];
         if (pCfgHost->enmDir == PDMAUDIODIR_IN)
         {
             if (pThis->In.Cfg.Dbg.fEnabled)
             {
-                char szFile[RTPATH_MAX + 1];
-
-                int rc2 = DrvAudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), pThis->In.Cfg.Dbg.szPathOut, "CaptureNonInterleaved",
+                int rc2 = DrvAudioHlpFileNameGet(szFile, sizeof(szFile), pThis->In.Cfg.Dbg.szPathOut, "CaptureNonInterleaved",
                                                  pThis->pDrvIns->iInstance, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);
                 if (RT_SUCCESS(rc2))
@@ -2566,5 +2565,5 @@
                 if (RT_SUCCESS(rc2))
                 {
-                    rc2 = DrvAudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), pThis->In.Cfg.Dbg.szPathOut, "StreamRead",
+                    rc2 = DrvAudioHlpFileNameGet(szFile, sizeof(szFile), pThis->In.Cfg.Dbg.szPathOut, "StreamRead",
                                                  pThis->pDrvIns->iInstance, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);
                     if (RT_SUCCESS(rc2))
@@ -2586,7 +2585,5 @@
             if (pThis->Out.Cfg.Dbg.fEnabled)
             {
-                char szFile[RTPATH_MAX + 1];
-
-                int rc2 = DrvAudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), pThis->Out.Cfg.Dbg.szPathOut, "PlayNonInterleaved",
+                int rc2 = DrvAudioHlpFileNameGet(szFile, sizeof(szFile), pThis->Out.Cfg.Dbg.szPathOut, "PlayNonInterleaved",
                                                  pThis->pDrvIns->iInstance, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);
                 if (RT_SUCCESS(rc2))
@@ -2601,5 +2598,5 @@
                 if (RT_SUCCESS(rc2))
                 {
-                    rc2 = DrvAudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), pThis->Out.Cfg.Dbg.szPathOut, "StreamWrite",
+                    rc2 = DrvAudioHlpFileNameGet(szFile, sizeof(szFile), pThis->Out.Cfg.Dbg.szPathOut, "StreamWrite",
                                                  pThis->pDrvIns->iInstance, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);
                     if (RT_SUCCESS(rc2))
Index: /trunk/src/VBox/Devices/Audio/DrvAudio.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 82457)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 82458)
@@ -101,5 +101,5 @@
         /** Where to store the debugging files.
          *  Defaults to VBOX_AUDIO_DEBUG_DUMP_PCM_DATA_PATH if not set. */
-        char             szPathOut[RTPATH_MAX + 1];
+        char             szPathOut[RTPATH_MAX];
     } Dbg;
 } DRVAUDIOCFG, *PDRVAUDIOCFG;
Index: /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 82457)
+++ /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 82458)
@@ -1520,6 +1520,7 @@
     do
     {
-        char szFilePath[RTPATH_MAX + 1];
-        RTStrPrintf2(szFilePath, sizeof(szFilePath), "%s", pszPath);
+        char szFilePath[RTPATH_MAX];
+        rc = RTStrCopy(szFilePath, sizeof(szFilePath), pszPath);
+        AssertRCBreak(rc);
 
         /* Create it when necessary. */
@@ -1531,5 +1532,5 @@
         }
 
-        char szFileName[RTPATH_MAX + 1];
+        char szFileName[RTPATH_MAX];
         szFileName[0] = '\0';
 
@@ -1588,5 +1589,5 @@
             break;
 
-        RTStrPrintf2(pszFile, cchFile, "%s", szFilePath);
+        rc = RTStrCopy(pszFile, cchFile, szFilePath);
 
     } while (0);
Index: /trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp	(revision 82457)
+++ /trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp	(revision 82458)
@@ -142,6 +142,4 @@
     RT_NOREF(pDrv, pCfgAcq);
 
-    int rc = VINF_SUCCESS;
-
     pStreamDbg->tsStarted = 0;
     pStreamDbg->uSamplesSinceStarted = 0;
@@ -149,45 +147,36 @@
     pStreamDbg->Out.cbPlayBuffer  = DrvAudioHlpFramesToBytes(pCfgReq->Backend.cFramesBufferSize, &pCfgReq->Props);
     pStreamDbg->Out.pu8PlayBuffer = (uint8_t *)RTMemAlloc(pStreamDbg->Out.cbPlayBuffer);
-    if (!pStreamDbg->Out.pu8PlayBuffer)
-        rc = VERR_NO_MEMORY;
-
+    AssertReturn(pStreamDbg->Out.pu8PlayBuffer, VERR_NO_MEMORY);
+
+    char szTemp[RTPATH_MAX];
+    int rc = RTPathTemp(szTemp, sizeof(szTemp));
     if (RT_SUCCESS(rc))
-    {
-        char szTemp[RTPATH_MAX];
-        rc = RTPathTemp(szTemp, sizeof(szTemp));
-
-        RTPathAppend(szTemp, sizeof(szTemp), "VBoxTestTmp\\VBoxAudioValKit");
-
+        rc = RTPathAppend(szTemp, sizeof(szTemp), "VBoxTestTmp\\VBoxAudioValKit");
+    if (RT_SUCCESS(rc))
+    {
+        char szFile[RTPATH_MAX];
+        rc = DrvAudioHlpFileNameGet(szFile, sizeof(szFile), szTemp, "VaKit",
+                                    0 /* Instance */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);
         if (RT_SUCCESS(rc))
         {
-            char szFile[RTPATH_MAX + 1];
-
-            rc = DrvAudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), szTemp, "VaKit",
-                                        0 /* Instance */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);
+            rc = DrvAudioHlpFileCreate(PDMAUDIOFILETYPE_WAV, szFile, PDMAUDIOFILE_FLAGS_NONE, &pStreamDbg->pFile);
             if (RT_SUCCESS(rc))
-            {
-                rc = DrvAudioHlpFileCreate(PDMAUDIOFILETYPE_WAV, szFile, PDMAUDIOFILE_FLAGS_NONE, &pStreamDbg->pFile);
-                if (RT_SUCCESS(rc))
-                    rc = DrvAudioHlpFileOpen(pStreamDbg->pFile, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS, &pCfgReq->Props);
-            }
-
-            if (RT_FAILURE(rc))
-            {
-                LogRel(("VaKitAudio: Creating output file '%s' failed with %Rrc\n", szFile, rc));
-            }
-            else
-            {
-                size_t cch;
-                char szTimingInfo[128];
-                cch = RTStrPrintf(szTimingInfo, sizeof(szTimingInfo), "# %uHz %uch %ubit\n",
-                                  pCfgReq->Props.uHz, pCfgReq->Props.cChannels, pCfgReq->Props.cbSample * 8);
-
-                RTFileWrite(pStreamDbg->hFileTiming, szTimingInfo, cch, NULL);
-            }
+                rc = DrvAudioHlpFileOpen(pStreamDbg->pFile, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS, &pCfgReq->Props);
         }
+
+        if (RT_FAILURE(rc))
+            LogRel(("VaKitAudio: Creating output file '%s' failed with %Rrc\n", szFile, rc));
         else
-            LogRel(("VaKitAudio: Unable to retrieve temp dir: %Rrc\n", rc));
-    }
-
+        {
+            size_t cch;
+            char szTimingInfo[128];
+            cch = RTStrPrintf(szTimingInfo, sizeof(szTimingInfo), "# %uHz %uch %ubit\n",
+                              pCfgReq->Props.uHz, pCfgReq->Props.cChannels, pCfgReq->Props.cbSample * 8);
+
+            RTFileWrite(pStreamDbg->hFileTiming, szTimingInfo, cch, NULL);
+        }
+    }
+    else
+        LogRel(("VaKitAudio: Unable to retrieve temp dir: %Rrc\n", rc));
     return rc;
 }
