commit | 0fb7abe717fab15465cc508e1952991147d96316 | [log] [tgz] |
---|---|---|
author | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | Wed Jun 03 15:05:44 2020 -0700 |
committer | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | Wed Jun 03 15:10:15 2020 -0700 |
tree | 6613efd57d1ec9b33d4e15e429c380af99d22ea7 | |
parent | a16fa1f6992583ad2dabb388a97150033efe4d92 [diff] |
librmnetctl: Fix potential overflow Change bound from <= to < to avoid potential buffer overflow. Change-Id: Ib08d4913d9861f064a046cda5dc61f639a81bf28
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 @@ 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; } }