cygwin: Fix crash if env var name starts with non-ASCII char
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
41b7ef9e1f
commit
7afc1124b6
|
@ -351,7 +351,7 @@ static const unsigned char conv_start_chars[256] =
|
|||
static inline char
|
||||
match_first_char (const char *s, unsigned char m)
|
||||
{
|
||||
return conv_start_chars[(unsigned) *s] & m;
|
||||
return conv_start_chars[*(unsigned char *)s] & m;
|
||||
}
|
||||
|
||||
struct win_env&
|
||||
|
@ -795,7 +795,7 @@ environ_init (char **envp, int envc)
|
|||
}
|
||||
debug_printf ("GetEnvironmentStrings returned %p", rawenv);
|
||||
|
||||
lastenviron = envp = win32env_to_cygenv (rawenv, true);
|
||||
lastenviron = envp = win32env_to_cygenv (rawenv, true);
|
||||
|
||||
FreeEnvironmentStringsW (rawenv);
|
||||
|
||||
|
|
Loading…
Reference in New Issue