=?UTF-8?Q?Michael=20M=C3=BCller=20?=: kernel32: Correctly check for an empty short filename in GetShortPathNameW ( Coverity).
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 1 07:36:59 CDT 2015
Module: wine
Branch: master
Commit: 803e9cfb66de6283d956868784a19b15cf62b435
URL: http://source.winehq.org/git/wine.git/?a=commit;h=803e9cfb66de6283d956868784a19b15cf62b435
Author: Michael Müller <michael at fds-team.de>
Date: Sat May 30 15:36:43 2015 +0200
kernel32: Correctly check for an empty short filename in GetShortPathNameW (Coverity).
---
dlls/kernel32/path.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index f74b952..09b8b7f 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -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;
More information about the wine-cvs
mailing list