提交 037d3656 编写于 作者: M Maxim Osipov 提交者: Greg Kroah-Hartman

USB: Fix kernel oops with g_ether and Windows

Please find attached patch for
https://bugzilla.kernel.org/show_bug.cgi?id=16023 problem.
Signed-off-by: NMaxim Osipov <maxim.osipov@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 793f03aa
......@@ -293,9 +293,13 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
/* mandatory */
case OID_GEN_VENDOR_DESCRIPTION:
pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
length = strlen (rndis_per_dev_params [configNr].vendorDescr);
memcpy (outbuf,
rndis_per_dev_params [configNr].vendorDescr, length);
if ( rndis_per_dev_params [configNr].vendorDescr ) {
length = strlen (rndis_per_dev_params [configNr].vendorDescr);
memcpy (outbuf,
rndis_per_dev_params [configNr].vendorDescr, length);
} else {
outbuf[0] = 0;
}
retval = 0;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册