mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 18:10:57 +02:00
Merge branch 'contrib/github_pr_17582' into 'master'
fix(mbedtls): prevent vectorization fault in clang O2 optimization (GitHub PR) Closes IDFGH-16450 See merge request espressif/esp-idf!41973
This commit is contained in:
@@ -62,6 +62,9 @@ static int esp_ds_rsaes_pkcs1_v15_unpadding(unsigned char *input,
|
||||
}
|
||||
|
||||
/* Verify padding bytes are non-zero in constant time */
|
||||
#if defined(__clang__) && defined(__xtensa__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for (size_t i = 2; i < ilen; i++) {
|
||||
unsigned char in_padding = (i < pad_count + 2);
|
||||
unsigned char is_zero = (input[i] == 0x00);
|
||||
|
@@ -0,0 +1,2 @@
|
||||
CONFIG_COMPILER_RT_LIB_CLANGRT=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
Reference in New Issue
Block a user