Re: [PATCH v3][next] scsi: aacraid: Replace one-element array with flexible-array member

From: Kees Cook
Date: Wed Apr 21 2021 - 23:20:58 EST


On Wed, Apr 21, 2021 at 11:03:19PM -0400, Martin K. Petersen wrote:
>
> Hi Gustavo!
>
> > Changes in v3:
> > - Use (nseg_new-1)*sizeof(struct sge_ieee1212) to calculate
> > size in call to memcpy() in order to avoid any confusion.
>
> The amended memcpy() hunk appears to be missing from the v3 patch.

It's unchanged from the perspective of the original code. (i.e. there's
no need to change it since that memcpy isn't involved in anything
changed by the swapping to the flexible array.)

--
Kees Cook