compile, even if it won't yet be safe.
return i;
}
+#warning "Remove this buffer-overflow-in-waiting at some point"
+int snprintf ( char *buf, size_t size, const char *fmt, ... ) {
+ va_list args;
+ int i;
+
+ va_start ( args, fmt );
+ i = vsprintf ( buf, fmt, args );
+ va_end ( args );
+ return i;
+}
+
/**
* Write a formatted string to the console.
*
*/
extern int sprintf ( char *buf, const char *fmt, ... );
+extern int snprintf ( char *buf, size_t size, const char *fmt, ... );
extern int printf ( const char *fmt, ... );
#endif /* VSPRINTF_H */