Cope with platforms whose vsnprintf violates both POSIX and C99 - part 1

This commit is contained in:
Simon McVittie 2011-07-03 06:47:39 +02:00 committed by Ralf Habacker
parent e7bd2bb848
commit b32aaa8a57

View file

@ -1129,6 +1129,9 @@ _dbus_string_append_printf_valist (DBusString *str,
/* Measure the message length without terminating nul */
len = _dbus_printf_string_upper_bound (format, args);
if (len < 0)
return FALSE;
if (!_dbus_string_lengthen (str, len))
{
/* don't leak the copy */