From: Karel Zak Date: Thu, 6 Aug 2015 11:32:07 +0000 (+0200) Subject: libsystemd: fix RTNL_CONTAINER_DEPTH assert X-Git-Tag: v225~79^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0610939d6bd21873cd2a8d945daff86c477a5015;p=thirdparty%2Fsystemd.git libsystemd: fix RTNL_CONTAINER_DEPTH assert The m->n_containers is index and has to be smaller than the array size. --- diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c index 3ba62a6be98..aee2ced2d93 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);