Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit aea1ae87 authored by Johan Hovold's avatar Johan Hovold
Browse files

USB: ftdi_sio: fix null deref at port probe



Fix NULL-pointer dereference when probing an interface with no
endpoints.

These devices have two bulk endpoints per interface, but this avoids
crashing the kernel if a user forces a non-FTDI device to be probed.

Note that the iterator variable was made unsigned in order to avoid
a maybe-uninitialized compiler warning for ep_desc after the loop.

Fixes: 895f28ba ("USB: ftdi_sio: fix hi-speed device packet size
calculation")

Reported-by: default avatarMike Remski <mremski@mutualink.net>
Tested-by: default avatarMike Remski <mremski@mutualink.net>
Cc: <stable@vger.kernel.org>	# 2.6.31
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 53066e3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment