Commit 803e9cfb authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

kernel32: Correctly check for an empty short filename in GetShortPathNameW (Coverity).

parent d720c43c
...@@ -528,7 +528,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl ...@@ -528,7 +528,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
/* In rare cases (like "a.abcd") short path may be longer than original path. /* In rare cases (like "a.abcd") short path may be longer than original path.
* Make sure we have enough space in temp buffer. */ * Make sure we have enough space in temp buffer. */
if (wfd.cAlternateFileName && tmplen < strlenW(wfd.cAlternateFileName)) if (wfd.cAlternateFileName[0] && tmplen < strlenW(wfd.cAlternateFileName))
{ {
WCHAR *new_buf; WCHAR *new_buf;
buf_len += strlenW(wfd.cAlternateFileName) - tmplen; buf_len += strlenW(wfd.cAlternateFileName) - tmplen;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment