From: Ken Self Date: Sun, 4 Jan 2009 22:54:56 +0000 (+1100) Subject: vasprintf: stop HEAP exceptions X-Git-Tag: 1.0.0-pre1~1450 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=eecde311dbc19d69f306a2d4bf96a72d184c5363;p=vlc vasprintf: stop HEAP exceptions 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 --- diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index b88a900b23..726bb9e2e0 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -50,7 +50,7 @@ static inline int vasprintf (char **strp, const char *fmt, va_list ap) 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