[vlc-devel] commit: vasprintf: stop HEAP exceptions (Ken Self )

git version control git at videolan.org
Wed Jan 7 20:36:02 CET 2009


vlc | branch: master | Ken Self <kenself at optusnet.com.au> | Mon Jan  5 09:54:56 2009 +1100| [eecde311dbc19d69f306a2d4bf96a72d184c5363] | committer: Rémi Denis-Courmont 

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 <rdenis at simphalempin.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eecde311dbc19d69f306a2d4bf96a72d184c5363
---

 include/vlc_fixups.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index b88a900..726bb9e 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




More information about the vlc-devel mailing list