OSDN Git Service

USB: serial: digi_acceleport: fix incomplete rx sanity check
authorJohan Hovold <johan@kernel.org>
Tue, 31 Jan 2017 16:17:28 +0000 (17:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 12:00:18 +0000 (14:00 +0200)
commit9ca3010675025a512db998b1421ad0b60963c790
treefa16a66d8bab1dd6bf62e24ce08f9048ecfac9f2
parent84443215cf54861f3013253817afaf156efb1453
USB: serial: digi_acceleport: fix incomplete rx sanity check

commit 1b0aed2b1600f6e5c7b9acfbd610a4e351ef5232 upstream.

Make sure the received data has the required headers before parsing it.

Also drop the redundant urb-status check, which has already been handled
by the caller.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/digi_acceleport.c