Re: [PATCH] efi: Replace zero-length array and use struct_size() helper

2020-06-15 Thread Ard Biesheuvel
On Fri, 29 May 2020 at 19:32, Gustavo A. R. Silva wrote: > > On Fri, May 29, 2020 at 01:31:54AM -0700, Kees Cook wrote: > > On Wed, May 27, 2020 at 12:14:25PM -0500, Gustavo A. R. Silva wrote: > > > The current codebase makes use of the zero-length array language > > > extension to the C90 standar

Re: [PATCH] efi: Replace zero-length array and use struct_size() helper

2020-05-29 Thread Gustavo A. R. Silva
On Fri, May 29, 2020 at 01:31:54AM -0700, Kees Cook wrote: > On Wed, May 27, 2020 at 12:14:25PM -0500, 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

Re: [PATCH] efi: Replace zero-length array and use struct_size() helper

2020-05-29 Thread Kees Cook
On Wed, May 27, 2020 at 12:14:25PM -0500, 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 i

[PATCH] efi: Replace zero-length array and use struct_size() helper

2020-05-27 Thread Gustavo A. R. Silva
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[]; }; By ma