[vlc-devel] [PATCH] vasprintf: stop HEAP exceptions

Ken Self kenself at optusnet.com.au
Sun Jan 4 23:54:56 CET 2009


---
 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
-- 
1.5.4.3




More information about the vlc-devel mailing list