diff options
author | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2020-06-03 15:05:44 -0700 |
---|---|---|
committer | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2020-06-03 15:10:15 -0700 |
commit | 0fb7abe717fab15465cc508e1952991147d96316 (patch) | |
tree | 6613efd57d1ec9b33d4e15e429c380af99d22ea7 | |
parent | a16fa1f6992583ad2dabb388a97150033efe4d92 (diff) |
librmnetctl: Fix potential overflow
Change bound from <= to < to avoid potential buffer overflow.
Change-Id: Ib08d4913d9861f064a046cda5dc61f639a81bf28
-rw-r--r-- | rmnetctl/src/librmnetctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rmnetctl/src/librmnetctl.c b/rmnetctl/src/librmnetctl.c index 52e8ca9..8ad1874 100644 --- a/rmnetctl/src/librmnetctl.c +++ b/rmnetctl/src/librmnetctl.c @@ -1142,7 +1142,7 @@ static void rta_parse(struct rtattr **tb, int maxtype, struct rtattr *head, rta = RTA_NEXT(rta, len)) { __u16 type = rta->rta_type & NLA_TYPE_MASK; - if (type > 0 && type <= maxtype) + if (type > 0 && type < maxtype) tb[type] = rta; } } |