lkml.org 
[lkml]   [2023]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] serial: 8250: Check for valid console index
On Wed, Oct 04, 2023 at 11:55:10AM +0300, Tony Lindgren wrote:
> Let's not allow negative numbers for console index.

...

> - if (co->index >= UART_NR)
> + if (co->index < 0 || co->index >= UART_NR)
> co->index = 0;

in_range() ?

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-10-05 16:29    [W:0.328 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site