Re: [PATCH] esas2r: Use flex array destination for memcpy()

From: Martin K. Petersen
Date: Tue Sep 06 2022 - 22:25:23 EST



Kees,

> In preparation for FORTIFY_SOURCE performing run-time destination
> buffer bounds checking for memcpy(), specify the destination output
> buffer explicitly, instead of asking memcpy() to write past the end of
> what looked like a fixed-size object. Silences future run-time
> warning:
>
> memcpy: detected field-spanning write (size 80) of single field "trc + 1" (size 64)
>
> There is no binary code output differences from this change.

Applied to 6.1/scsi-staging, thanks!

--
Martin K. Petersen Oracle Linux Engineering