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

This commit is contained in:
Michael Müller 2015-05-30 15:36:43 +02:00 committed by Alexandre Julliard
parent d720c43caf
commit 803e9cfb66

View file

@ -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.
* 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;
buf_len += strlenW(wfd.cAlternateFileName) - tmplen;