提交 80649bb4 编写于 作者: M Maurizio Lombardi 提交者: Greg Kroah-Hartman

wlags49_h2: Fix overflow in wireless_set_essid()

This patch prevents the wireless_set_essid() function from overwriting
the last byte of the NetworkName buffer which must be NULL.
Signed-off-by: NMaurizio Lombardi <mlombard@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3ac7601b
......@@ -1061,7 +1061,7 @@ static int wireless_set_essid(struct net_device *dev, struct iw_request_info *in
goto out;
}
if (data->flags != 0 && data->length > HCF_MAX_NAME_LEN + 1) {
if (data->flags != 0 && data->length > HCF_MAX_NAME_LEN) {
ret = -EINVAL;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册