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: <61d8d56e-7235-86bd-a925-47f268a7b367@suse.cz>
Date:   Mon, 11 May 2020 08:07:14 +0200
From:   Jiri Slaby <jslaby@...e.cz>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: Replace zero-length array with flexible-array

On 07. 05. 20, 21:25, Gustavo A. R. Silva wrote:
> The current codebase makes use of the zero-length array language
> extension to the C90 standard, but the preferred mechanism to declare
> variable-length types such as these ones is a flexible array member[1][2],
> introduced in C99:
> 
> struct foo {
>         int stuff;
>         struct boo array[];
> };
...

Acked-by: Jiri Slaby <jslaby@...e.cz>

> Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
> ---
>  include/linux/tty.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/tty.h b/include/linux/tty.h
> index bd5fe0e907e8..a99e9b8e4e31 100644
> --- a/include/linux/tty.h
> +++ b/include/linux/tty.h
> @@ -66,7 +66,7 @@ struct tty_buffer {
>  	int read;
>  	int flags;
>  	/* Data points here */
> -	unsigned long data[0];
> +	unsigned long data[];
>  };
>  
>  /* Values for .flags field of tty_buffer */
> 

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ