Skip to content
Commit c2ed5611 authored by Kees Cook's avatar Kees Cook Committed by Jason Gunthorpe
Browse files

iw_cxgb4: Use memset_startat() for cpl_t5_pass_accept_rpl



In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memset(), avoid intentionally writing across
neighboring fields.

Use memset_startat() so memset() doesn't get confused about writing beyond
the destination member that is intended to be the starting point of
zeroing through the end of the struct. Additionally, since everything
appears to perform a roundup (including allocation), just change the size
of the struct itself and add a build-time check to validate the expected
size.

Link: https://lore.kernel.org/r/20211213223331.135412-13-keescook@chromium.org
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent e517f76a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment