summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/bus-message.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 4b53a6c509..3f9baca806 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -1379,6 +1379,7 @@ int message_append_basic(sd_bus_message *m, char type, const void *p, const void
break;
case SD_BUS_TYPE_BOOLEAN:
+
if (!p) {
r = -EINVAL;
goto fail;
@@ -1434,6 +1435,11 @@ int message_append_basic(sd_bus_message *m, char type, const void *p, const void
}
default:
+ if (!p) {
+ r = -EINVAL;
+ goto fail;
+ }
+
align = bus_type_get_alignment(type);
sz = bus_type_get_size(type);
break;