projects
/
platform
/
upstream
/
dbus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84b03ca
)
In Windows _dbus_printf_string_upper_bound, don't crash on malloc failure
author
Simon McVittie
<simon.mcvittie@collabora.co.uk>
Tue, 21 Jun 2011 13:09:52 +0000
(14:09 +0100)
committer
Ralf Habacker
<ralf.habacker@freenet.de>
Sun, 3 Jul 2011 04:36:07 +0000
(06:36 +0200)
dbus/dbus-sysdeps-win.c
patch
|
blob
|
history
diff --git
a/dbus/dbus-sysdeps-win.c
b/dbus/dbus-sysdeps-win.c
index
7b03c3d
..
f9afada
100644
(file)
--- a/
dbus/dbus-sysdeps-win.c
+++ b/
dbus/dbus-sysdeps-win.c
@@
-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);
}