mirror of
https://github.com/reactos/wine.git
synced 2025-02-12 23:58:56 +00:00
kernel32: Handle username conversion failure (Coverity).
This commit is contained in:
parent
2c7ac13662
commit
5493b77290
@ -495,6 +495,7 @@ static void set_additional_environment(void)
|
||||
MultiByteToWideChar( CP_UNIXCP, 0, name, -1, user_name, len );
|
||||
SetEnvironmentVariableW( usernameW, user_name );
|
||||
}
|
||||
else WARN( "user name %s not convertible.\n", debugstr_a(name) );
|
||||
|
||||
/* set the USERPROFILE and ALLUSERSPROFILE variables */
|
||||
|
||||
@ -522,8 +523,10 @@ static void set_additional_environment(void)
|
||||
strcpyW( value, profile_dir );
|
||||
p = value + strlenW(value);
|
||||
if (p > value && p[-1] != '\\') *p++ = '\\';
|
||||
strcpyW( p, user_name );
|
||||
SetEnvironmentVariableW( userprofileW, value );
|
||||
if (user_name) {
|
||||
strcpyW( p, user_name );
|
||||
SetEnvironmentVariableW( userprofileW, value );
|
||||
}
|
||||
if (all_users_dir)
|
||||
{
|
||||
strcpyW( p, all_users_dir );
|
||||
|
Loading…
x
Reference in New Issue
Block a user