summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/match.c b/match.c
index e6f93abcd62..04b6a0f5fbf 100644
--- a/match.c
+++ b/match.c
@@ -492,7 +492,8 @@ int kdbus_match_db_add(struct kdbus_conn *conn,
list_add_tail(&rule->rules_entry, &entry->rules_list);
}
- if (ret == 0 && !KDBUS_ITEMS_END(item, cmd))
+ if (ret == 0 &&
+ !KDBUS_ITEMS_END(item, cmd->items, KDBUS_ITEMS_SIZE(cmd, items)))
ret = -EINVAL;
if (ret == 0)