Commit d8c39160 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-serial-4.19-rc3' of...

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: default avatarJohan Hovold <johan@kernel.org>
parents 6e22e3af 5dfdd24e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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)