diff options
author | Steven Siloti <ssiloti@gmail.com> | 2014-03-30 21:20:26 -0700 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-04-07 10:37:08 -0400 |
commit | ef1a79119cc9cdeef03af17795e6a05459a0f3af (patch) | |
tree | 371c649c5122ae962e30ba77bc6d574edd967450 | |
parent | build-sys: fix library link order (diff) | |
download | systemd-gentoo-212.tar.gz systemd-gentoo-212.tar.bz2 systemd-gentoo-212.zip |
sd-rtnl: fix off-by-onegentoo-212
Also fix type parameter passed to new0
-rw-r--r-- | src/libsystemd/sd-rtnl/rtnl-message.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index 84a8ffa59..97ace2ace 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@ -1073,11 +1073,11 @@ int rtnl_message_parse(sd_rtnl_message *m, unsigned short type; size_t *tb; - tb = (size_t *) new0(size_t *, max); + tb = new0(size_t, max + 1); if(!tb) return -ENOMEM; - *rta_tb_size = max; + *rta_tb_size = max + 1; for (; RTA_OK(rta, rt_len); rta = RTA_NEXT(rta, rt_len)) { type = rta->rta_type; |