commit | b526c146f8714db66ab148d53c0f913eb22e5235 | [log] [tgz] |
---|---|---|
author | Jerome Forissier <jerome.forissier@linaro.org> | Fri Mar 07 10:49:12 2025 +0100 |
committer | Jerome Forissier <jerome.forissier@linaro.org> | Mon May 26 10:37:49 2025 +0200 |
tree | 50495061113166d723f10b95d6e31cf5a1a7ed78 | |
parent | e7332889098ef8f76039beafac04cfdb4f937f62 [diff] |
libmbedtls: fix compilation warning with GCC14 GCC 14.2 outputs the following compilation warning: CC out/arm-plat-imx/ta_arm64-lib/libmbedtls/mbedtls/library/ecp.o In file included from lib/libmbedtls/mbedtls/library/ctr_drbg.c:13: In function ‘mbedtls_xor’, inlined from ‘ctr_drbg_update_internal’ at lib/libmbedtls/mbedtls/library/ctr_drbg.c:372:5: lib/libmbedtls/mbedtls/library/common.h:245:17: warning: array subscript 48 is outside array bounds of ‘unsigned char[48]’ [-Warray-bounds=] 245 | r[i] = a[i] ^ b[i]; | ~^~~ lib/libmbedtls/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’: lib/libmbedtls/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ‘tmp’ of size 48 335 | unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN]; | ^~~ Fix it by returning early in mbedtls_xor() if the compiler is GCC. This fix is not in MBed TLS upstream yet but the issue and the fix have been reported [1]. Link: https://github.com/Mbed-TLS/mbedtls/issues/9003#issuecomment-2108239255 [1] Reported-by: Sahil Malhotra <sahil.malhotra@nxp.com> Closes: https://github.com/OP-TEE/optee_os/issues/7295 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Sahil Malhotra <sahil.malhotra@nxp.com>
This git contains source code for the secure side implementation of OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io.
// OP-TEE core maintainers