mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-06 00:10:38 +01:00
In Windows _dbus_printf_string_upper_bound, don't crash on malloc failure
This commit is contained in:
parent
110e06a78c
commit
7b63fe3cfa
1 changed files with 4 additions and 0 deletions
|
|
@ -549,6 +549,10 @@ int _dbus_printf_string_upper_bound (const char *format,
|
|||
bufsize *= 2;
|
||||
|
||||
p = malloc (bufsize);
|
||||
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
|
||||
len = _vsnprintf (p, bufsize - 1, format, args);
|
||||
free (p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue