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] [thread-next>] [day] [month] [year] [list]
Message-ID: <975e0566-c9e8-06d3-ec66-8a8aaf836760@suse.cz>
Date:   Tue, 7 Nov 2017 14:28:20 +0100
From:   Jiri Slaby <jslaby@...e.cz>
To:     Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, claudio@...dence.eu.com
Subject: Re: [PATCH] Documentation/rs485: Fix missing zero init on sample code

On 11/06/2017, 11:51 AM, Ricardo Ribalda Delgado wrote:
> The sample code does not initialize to zero a local variable and then it
> uses the uninitialized code.
> 
> Fix in case someone copy/paste the sample code.
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
> ---
>  Documentation/serial/serial-rs485.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt
> index 389fcd4759e9..2bbae93bf279 100644
> --- a/Documentation/serial/serial-rs485.txt
> +++ b/Documentation/serial/serial-rs485.txt
> @@ -54,7 +54,7 @@
>  		/* Error handling. See errno. */
>  	}
>  
> -	struct serial_rs485 rs485conf;
> +	struct serial_rs485 rs485conf = {};

I think that TIOCGRS485 is missing here instead. Ccing the author of the
text.

Does it break classifying potatoes :)?

>  	/* Enable RS485 mode: */
>  	rs485conf.flags |= SER_RS485_ENABLED;
> 

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ