summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-29 10:02:39 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-29 16:04:36 +0200
commit716706d6ba38e6dc28067af84cfe8b7e64920914 (patch)
tree9ce8de6eda084a68ab2c1898e9456b9d537d978f /sal
parentcfb913db1b2024f8ff6a55f45742b303107a1924 (diff)
WaE: C6054: String 'baseDrive' might not be zero-terminated
Change-Id: I0d3192dbac5ca73cd93051bcdf812bbe34a77c8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/file_url.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index a14f8d4b9b39..8942c5ca6e5e 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -943,7 +943,7 @@ oslFileError SAL_CALL osl_getAbsoluteFileURL( rtl_uString* ustrBaseURL, rtl_uStr
else
{
// Call GetFullPathNameW to get current directory on ustrRelSysPath's drive
- wchar_t baseDrive[3] = { ustrRelSysPath[0], ':' }; // just "C:"
+ wchar_t baseDrive[3] = { ustrRelSysPath[0], ':', 0 }; // just "C:"
osl::LongPathBuffer<wchar_t> aBuf(MAX_LONG_PATH);
DWORD dwResult
= GetFullPathNameW(baseDrive, aBuf.getBufSizeInSymbols(), aBuf, nullptr);