summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/netlink-message.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2015-08-06 13:32:07 +0200
committerKarel Zak <kzak@redhat.com>2015-08-06 13:33:53 +0200
commit0610939d6bd21873cd2a8d945daff86c477a5015 (patch)
tree7461c6e311917c5eacc1dca765de8d6dc6fad631 /src/libsystemd/sd-netlink/netlink-message.c
parenta6b095186891e9c0fa61a191126977c5eea6f111 (diff)
libsystemd: fix RTNL_CONTAINER_DEPTH assert
The m->n_containers is index and has to be smaller than the array size.
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-message.c')
-rw-r--r--src/libsystemd/sd-netlink/netlink-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c
index 3ba62a6be9..aee2ced2d9 100644
--- a/src/libsystemd/sd-netlink/netlink-message.c
+++ b/src/libsystemd/sd-netlink/netlink-message.c
@@ -501,7 +501,7 @@ static int netlink_message_read_internal(sd_netlink_message *m, unsigned short t
assert_return(m, -EINVAL);
assert_return(m->sealed, -EPERM);
assert_return(data, -EINVAL);
- assert(m->n_containers <= RTNL_CONTAINER_DEPTH);
+ assert(m->n_containers < RTNL_CONTAINER_DEPTH);
assert(m->containers[m->n_containers].attributes);
assert(type < m->containers[m->n_containers].n_attributes);