diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-29 19:55:37 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-29 19:55:37 +0100 |
commit | 80ba3b84ddf40fccbc21184c2da41d97fe85633d (patch) | |
tree | 8b8b1699ec0bb33a67a56bf84b0e9ec24e96f0cf /src/libsystemd-bus/bus-message.c | |
parent | 250a918dc4c8a15d927deecc3b3f6a0604657ae4 (diff) |
bus: add extra validity checks
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r-- | src/libsystemd-bus/bus-message.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c index 0d565ddf9c..138d664f3c 100644 --- a/src/libsystemd-bus/bus-message.c +++ b/src/libsystemd-bus/bus-message.c @@ -4431,6 +4431,11 @@ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all) { bool done_something = false; int r; + assert_return(m, -EINVAL); + assert_return(source, -EINVAL); + assert_return(!m->sealed, -EPERM); + assert_return(source->sealed, -EPERM); + do { const char *contents; char type; |