mirror of https://github.com/hak5/openwrt.git
rtl8366_smi: fix parameter checking in rtl8366_attr_get_vlan_info
SVN-Revision: 19241lede-17.01
parent
743e7617b0
commit
0296b24f80
|
@ -1359,7 +1359,7 @@ static int rtl8366_attr_get_vlan_info(struct switch_dev *dev,
|
||||||
struct rtl8366_smi *smi = sw_to_rtl8366(dev);
|
struct rtl8366_smi *smi = sw_to_rtl8366(dev);
|
||||||
char *buf = smi->buf;
|
char *buf = smi->buf;
|
||||||
|
|
||||||
if (val->port_vlan >= RTL8366_NUM_PORTS)
|
if (val->port_vlan >= RTL8366_NUM_VLANS)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
memset(buf, '\0', sizeof(smi->buf));
|
memset(buf, '\0', sizeof(smi->buf));
|
||||||
|
|
Loading…
Reference in New Issue