[ZIPFLDR] Fix PathCompactPathW writing out of bounds
authorMark Jansen <mark.jansen@reactos.org>
Sun, 6 Sep 2020 12:28:56 +0000 (14:28 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Sun, 6 Sep 2020 12:28:56 +0000 (14:28 +0200)
CORE-17245

dll/shellext/zipfldr/CZipExtract.cpp

index f9dd21d..1ccba19 100644 (file)
@@ -293,7 +293,7 @@ public:
         {
             SetWizardButtons(PSWIZB_FINISH);
             CStringW Path = m_pExtract->m_Directory;
-            PWSTR Ptr = Path.GetBuffer();
+            PWSTR Ptr = Path.GetBuffer(MAX_PATH);
             RECT rc;
             ::GetWindowRect(GetDlgItem(IDC_DESTDIR), &rc);
             HDC dc = GetDC();