On Win32, vsnprintf() and vsprintf() are formatting certain things
differently, e.g. "%p". We need to use the same implementation
throughout our vasprintf() replacement.
Signed-off-by: Rémi Denis-Courmont <rdenis@simphalempin.com>
if (res == NULL)
return -1;
*strp = res;
if (res == NULL)
return -1;
*strp = res;
- return vsprintf (res, fmt, ap);
+ return vsnprintf (res, len, fmt, ap);
#else
/* HACK: vsnprintf in the WinCE API behaves like
* the one in glibc 2.0 and doesn't return the number of characters
#else
/* HACK: vsnprintf in the WinCE API behaves like
* the one in glibc 2.0 and doesn't return the number of characters