Annotate dbus_malloc*() functions with __attribute__ malloc and __attribute__ alloc_size
This improves optimization as well catches buffer overflows at compile time.
code like:
foo = dbus_malloc(2);
strcpy(foo, "epicfail");
will emit:
"warning ... will always overflow the destination buffer..."
Signed-off-by: Cristian Rodríguez <cristian.rodriguez@opensuse.org>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32710