mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
USB: serial: safe_serial: fix information leak in completion handler
am: 3cdc946387
Change-Id: I2a29b5d7a753bd94d320bda52427bd62ab042787
This commit is contained in:
@@ -205,6 +205,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