diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-23 08:15:55 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-23 08:15:55 +0100 |
commit | 628d4c46eef4fabe3ddbe07698577162c1cd5d41 (patch) | |
tree | 5e89f3deafd44c8b81543540c573af0c16dbb427 /drivers/usb/serial/safe_serial.c | |
parent | drm/dp: Split drm_dp_mst_allocate_vcpi (diff) | |
parent | BackMerge tag 'v4.11-rc3' into drm-next (diff) | |
download | linux-628d4c46eef4fabe3ddbe07698577162c1cd5d41.tar.xz linux-628d4c46eef4fabe3ddbe07698577162c1cd5d41.zip |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux into drm-misc-next
Resync with drm-next, I have a patch which currently can't be applied
because drm-misc-next lacked the latest drm/i915 code.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/usb/serial/safe_serial.c')
-rw-r--r-- | drivers/usb/serial/safe_serial.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 93c6c9b08daa..8a069aa154ed 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c @@ -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); |