summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2014-10-25 00:45:28 +0100
committerDjalal Harouni <tixxdz@opendz.org>2014-10-25 00:45:28 +0100
commit9e894108a9f022637e8150c31490094a8dc00a9a (patch)
tree98ea5671e6181d799f70b8a3b9929d2af27e9182
parentce9aade0f8e5ec19c2512ca1f67a27642a4995d8 (diff)
downloadkdbus-bus-9e894108a9f022637e8150c31490094a8dc00a9a.tar.gz
kdbus-bus-9e894108a9f022637e8150c31490094a8dc00a9a.tar.bz2
kdbus-bus-9e894108a9f022637e8150c31490094a8dc00a9a.zip
handle: validate items in kdbus_items_validate() in KDBUS_CMD_CONN_INFO
Try to validate the KDBUS_ITEM_NAME before going further Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
-rw-r--r--handle.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/handle.c b/handle.c
index 12f132f8341..dabafad7b26 100644
--- a/handle.c
+++ b/handle.c
@@ -861,6 +861,11 @@ static long kdbus_handle_ioctl_ep_connected(struct file *file, unsigned int cmd,
if (ret < 0)
break;
+ ret = kdbus_items_validate(cmd_info->items,
+ KDBUS_ITEMS_SIZE(cmd_info, items));
+ if (ret < 0)
+ break;
+
if (cmd == KDBUS_CMD_CONN_INFO)
ret = kdbus_cmd_info(conn, cmd_info);
else