mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
USB: serial: safe_serial: fix information leak in completion handler
am: 0ab90ddba7
Change-Id: Id1d59a85bcec9ebc9a7307843c5cfd70179d9a59
This commit is contained in:
@@ -200,6 +200,11 @@ static void safe_process_read_urb(struct urb *urb)
|
||||
if (!safe)
|
||||
goto out;
|
||||
|
||||
if (length < 2) {
|
||||
dev_err(&port->dev, "malformed packet\n");
|
||||
return;
|
||||
}
|
||||
|
||||
fcs = fcs_compute10(data, length, CRC10_INITFCS);
|
||||
if (fcs) {
|
||||
dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs);
|
||||
|
||||
Reference in New Issue
Block a user