crypto: caam - Avoid GCC memset bug warning
Certain versions of gcc don't like the memcpy with a NULL dst (which only happens with a zero length). This only happens when debugging is enabled so add an if clause to work around these warnings. A similar warning used to be generated by sparse but that was fixed years ago. Link: https://lore.kernel.org/lkml/202210290446.qBayTfzl-lkp@intel.comReported-by: Nkernel test robot <lkp@intel.com> Reported-by: NKees Cook <keescook@chromium.org> Reported-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Showing
想要评论请 注册 或 登录