* environ.cc (build_env): Fix length calculation of resulting
wide char environment string.
This commit is contained in:
parent
be37a55086
commit
eab96f6b22
|
@ -1,3 +1,8 @@
|
||||||
|
2009-04-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* environ.cc (build_env): Fix length calculation of resulting
|
||||||
|
wide char environment string.
|
||||||
|
|
||||||
2009-04-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
2009-04-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
||||||
|
|
||||||
* include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
|
* include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
|
||||||
|
|
|
@ -1080,7 +1080,7 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
|
||||||
else
|
else
|
||||||
p = *srcp; /* Don't worry about it */
|
p = *srcp; /* Don't worry about it */
|
||||||
|
|
||||||
len = strlen (p) + 1;
|
len = sys_mbstowcs (NULL, 0, p);
|
||||||
new_tl += len; /* Keep running total of block length so far */
|
new_tl += len; /* Keep running total of block length so far */
|
||||||
|
|
||||||
/* See if we need to increase the size of the block. */
|
/* See if we need to increase the size of the block. */
|
||||||
|
@ -1097,7 +1097,7 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int slen = sys_mbstowcs (s, len, p, len);
|
int slen = sys_mbstowcs (s, len, p);
|
||||||
|
|
||||||
/* See if environment variable is "special" in a Windows sense.
|
/* See if environment variable is "special" in a Windows sense.
|
||||||
Under NT, the current directories for visited drives are stored
|
Under NT, the current directories for visited drives are stored
|
||||||
|
|
Loading…
Reference in New Issue