From eecde311dbc19d69f306a2d4bf96a72d184c5363 Mon Sep 17 00:00:00 2001 From: Ken Self Date: Mon, 5 Jan 2009 09:54:56 +1100 Subject: [PATCH] vasprintf: stop HEAP exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- include/vlc_fixups.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2