Module: wine Branch: master Commit: b7cefc999701a5c2ff8ffc5c5f3da77ff82a874d URL: http://source.winehq.org/git/wine.git/?a=commit;h=b7cefc999701a5c2ff8ffc5c5f...
Author: Hans Leidekker hans@codeweavers.com Date: Wed Aug 1 11:54:18 2012 +0200
msi: Avoid an out of bounds access in msi_build_directory_name.
---
dlls/msi/action.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 1ad3bc2..e1d2f2a 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2154,7 +2154,7 @@ WCHAR *msi_build_directory_name( DWORD count, ... ) const WCHAR *str = va_arg( va, const WCHAR * ); if (!str) continue; strcatW( dir, str ); - if ( i + 1 != count && dir[strlenW( dir ) - 1] != '\') strcatW( dir, szBackSlash ); + if ( i + 1 != count && dir[0] && dir[strlenW( dir ) - 1] != '\') strcatW( dir, szBackSlash ); } va_end( va ); return dir;