mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Merge branch 'maint-0.2.9'
This commit is contained in:
commit
31f41fe096
4
changes/bug20560
Normal file
4
changes/bug20560
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes (portability):
|
||||||
|
- Run correctly when built on Windows build environments that require
|
||||||
|
_vcsprintf(). Fixes bug 20560; bugfix on 0.2.2.11-alpha.
|
||||||
|
|
@ -532,7 +532,10 @@ tor_vasprintf(char **strp, const char *fmt, va_list args)
|
|||||||
/* On Windows, _vsnprintf won't tell us the length of the string if it
|
/* On Windows, _vsnprintf won't tell us the length of the string if it
|
||||||
* overflows, so we need to use _vcsprintf to tell how much to allocate */
|
* overflows, so we need to use _vcsprintf to tell how much to allocate */
|
||||||
int len, r;
|
int len, r;
|
||||||
len = _vscprintf(fmt, args);
|
va_list tmp_args;
|
||||||
|
va_copy(tmp_args, args);
|
||||||
|
len = _vscprintf(fmt, tmp_args);
|
||||||
|
va_end(tmp_args);
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
*strp = NULL;
|
*strp = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user