diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-07-03 06:47:39 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2011-07-08 11:00:12 +0200 |
commit | fa1a85e121e2e6b4e3a517ba61b79922f59d591f (patch) | |
tree | 8edfaccba40b54f6c76c1b1c431ec254341f94ae | |
parent | 7b63fe3cfa4e8c289bde0dbcfdaa95d692c39cdb (diff) |
Cope with platforms whose vsnprintf violates both POSIX and C99 - part 1
-rw-r--r-- | dbus/dbus-string.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c index e2eb93b9..ca3a670b 100644 --- a/dbus/dbus-string.c +++ b/dbus/dbus-string.c @@ -1255,6 +1255,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 */ |