lkml.org 
[lkml]   [2023]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] nvmem: u-boot-env: replace zero-length array with flexible-array member
On Fri, Jan 13, 2023 at 07:41:02AM +0100, Rafał Miłecki wrote:
> On 2023-01-10 02:40, Gustavo A. R. Silva wrote:
> > Zero-length arrays are deprecated[1] and we are moving towards
> > adopting C99 flexible-array members instead. So, replace zero-length
> > array declaration in struct u_boot_env_image_broadcom with flex-array
> > member.
> >
> > This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
> > routines on memcpy() and help us make progress towards globally
> > enabling -fstrict-flex-arrays=3 [2].
>
> I also handled this issue in my
> [PATCH V2 4/6] nvmem: u-boot-env: convert to layout driver
> https://lore.kernel.org/linux-arm-kernel/20230111073102.8147-4-zajec5@gmail.com/

Ah-ha, thanks! Looks good. :)

--
Kees Cook

\
 
 \ /
  Last update: 2023-03-26 23:55    [W:0.862 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site