Commit 86db7bf
net: hns3: void array out of bound when loop tnl_num
When query reg inf of SSU, it loops tnl_num times. However, tnl_num comes
from hardware and the length of array is a fixed value. To void array out
of bound, make sure the loop time is not greater than the length of array
Signed-off-by: Peiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent be5e816 commit 86db7bf
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1598 | 1598 | | |
1599 | 1599 | | |
1600 | 1600 | | |
1601 | | - | |
1602 | | - | |
| 1601 | + | |
1603 | 1602 | | |
1604 | 1603 | | |
1605 | 1604 | | |
| |||
1609 | 1608 | | |
1610 | 1609 | | |
1611 | 1610 | | |
1612 | | - | |
| 1611 | + | |
| 1612 | + | |
1613 | 1613 | | |
1614 | 1614 | | |
1615 | 1615 | | |
| |||
0 commit comments