diff options
author | Denys Vlasenko | 2018-02-08 08:42:37 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-02-08 08:42:37 +0100 |
commit | 68ae54243cacee6beeb69842c7d562435acd5ad1 (patch) | |
tree | 0991e9bfa88bcdff63be362ad62627aacf532b37 /networking/libiproute/ll_map.c | |
parent | 237a900bc5654c865298b33a70dee60e2cd05dbc (diff) | |
download | busybox-68ae54243cacee6beeb69842c7d562435acd5ad1.zip busybox-68ae54243cacee6beeb69842c7d562435acd5ad1.tar.gz |
ip: fix crash in "ip neigh show"
parse_rtattr() was using tb[] array without initializing it.
Based on patch by Balaji Punnuru <balaji_punnuru@cable.comcast.com>
function old new delta
parse_rtattr 85 107 +22
print_route 1630 1617 -13
print_linkinfo 807 794 -13
iproute_get 835 822 -13
print_rule 680 665 -15
ll_remember_index 263 248 -15
print_addrinfo 1223 1197 -26
ipaddr_list_or_flush 1253 1223 -30
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/7 up/down: 22/-125) Total: -103 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute/ll_map.c')
-rw-r--r-- | networking/libiproute/ll_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index be88a04..66401da 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c @@ -51,7 +51,7 @@ int FAST_FUNC ll_remember_index(const struct sockaddr_nl *who UNUSED_PARAM, if (n->nlmsg_len < NLMSG_LENGTH(sizeof(ifi))) return -1; - memset(tb, 0, sizeof(tb)); + //memset(tb, 0, sizeof(tb)); - parse_rtattr does this parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), IFLA_PAYLOAD(n)); if (tb[IFLA_IFNAME] == NULL) return 0; |