media: uvcvideo: Stream error events carry no data
According to the UVC specification, stream error events carry no data. Fix a buffer overflow (that should be harmless given data alignment) when reporting the stream error event by removing the data byte from the message. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
dfc1648c57
commit
0393e73564
|
@ -93,8 +93,9 @@ static void uvc_event_streaming(struct uvc_device *dev, __u8 *data, int len)
|
|||
data[1], data[3] ? "pressed" : "released", len);
|
||||
uvc_input_report_key(dev, KEY_CAMERA, data[3]);
|
||||
} else {
|
||||
uvc_trace(UVC_TRACE_STATUS, "Stream %u error event %02x %02x "
|
||||
"len %d.\n", data[1], data[2], data[3], len);
|
||||
uvc_trace(UVC_TRACE_STATUS,
|
||||
"Stream %u error event %02x len %d.\n",
|
||||
data[1], data[2], len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue