mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-12 19:44:51 -04:00
Merge tag 'usb-serial-4.19-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes: USB-serial fixes for v4.19-rc3 Here are two fixes for array-underflow bugs in completion handlers due to insufficient sanity checks. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
@@ -173,7 +173,7 @@ struct ump_interrupt {
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
#define TIUMP_GET_PORT_FROM_CODE(c) (((c) >> 4) - 3)
|
||||
#define TIUMP_GET_PORT_FROM_CODE(c) (((c) >> 6) & 0x01)
|
||||
#define TIUMP_GET_FUNC_FROM_CODE(c) ((c) & 0x0f)
|
||||
#define TIUMP_INTERRUPT_CODE_LSR 0x03
|
||||
#define TIUMP_INTERRUPT_CODE_MSR 0x04
|
||||
|
||||
@@ -1119,7 +1119,7 @@ static void ti_break(struct tty_struct *tty, int break_state)
|
||||
|
||||
static int ti_get_port_from_code(unsigned char code)
|
||||
{
|
||||
return (code >> 4) - 3;
|
||||
return (code >> 6) & 0x01;
|
||||
}
|
||||
|
||||
static int ti_get_func_from_code(unsigned char code)
|
||||
|
||||
Reference in New Issue
Block a user