diff options
author | Daniel Mack <zonque@gmail.com> | 2013-12-03 03:02:39 +0100 |
---|---|---|
committer | Daniel Mack <zonque@gmail.com> | 2013-12-03 09:39:10 +0100 |
commit | efdb465d70173acea9b1596ed4021f429513fa6b (patch) | |
tree | 37bf386206a9023b74e4ba4e8764488c8849f199 | |
parent | eb6999de4a2a0a943180254ed26e5c95ea6e85f3 (diff) | |
download | kdbus-bus-efdb465d70173acea9b1596ed4021f429513fa6b.tar.gz kdbus-bus-efdb465d70173acea9b1596ed4021f429513fa6b.tar.bz2 kdbus-bus-efdb465d70173acea9b1596ed4021f429513fa6b.zip |
add sanity check to kdbus_conn_move_messages
-rw-r--r-- | connection.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/connection.c b/connection.c index f29472fe40d..ba8b7d9aff3 100644 --- a/connection.c +++ b/connection.c @@ -938,6 +938,9 @@ int kdbus_conn_move_messages(struct kdbus_conn *conn_dst, if (!(conn_src->flags & KDBUS_HELLO_STARTER)) return -EINVAL; + if (conn_src == conn_dst) + return -EINVAL; + mutex_lock(&conn_src->lock); mutex_lock(&conn_dst->lock); |