lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100301080402.GD32296@distanz.ch>
Date:	Mon, 1 Mar 2010 09:04:02 +0100
From:	Tobias Klauser <tklauser@...tanz.ch>
To:	Dan Carpenter <error27@...il.com>, linux-serial@...r.kernel.org,
	nios2-dev@...c.et.ntust.edu.tw, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH 2/2] serial: Add driver for the Altera UART

On 2010-02-26 at 20:50:22 +0100, Dan Carpenter <error27@...il.com> wrote:
> A couple smatch complaints.
> 
> drivers/serial/altera_jtaguart.c
>    380          if (co->index >= 0 && co->index <= ALTERA_JTAGUART_MAXPORTS)
>    381                  co->index = 0;
>    382          port = &altera_jtaguart_ports[co->index].port;
> 
> This test seems backward.  co->index == -1 would be a buffer underflow.
> 
> drivers/serial/altera_uart.c
>    455          if ((co->index >= 0)
>    456              && (co->index <= CONFIG_SERIAL_ALTERA_UART_MAXPORTS))
>    457                  co->index = 0;
>    458          port = &altera_uart_ports[co->index].port;
> 
> Same here.

Yep, those look completely wrong. I'll post an updated patch (including
the other changes suggested by Alan and Peter) later on.

Thanks,
Tobias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ