mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 08:24:23 +01:00
0af25e71ab
The `id` parameter of the public `MBEDTLS_X509_ID_FLAG` macro was used in a subtraction without being surrounded by parentheses. Since some operators bind less strongly than subtraction, this could lead to erroneous evaluation of `MBEDTLS_X509_ID_FLAG`. For example, `MBEDTLS_X509_ID_FLAG( 1 << 2 )` would evaluate evaluate to `1 << ( 1 << 2 - 1 ) == 1 << ( 1 << 1 ) == 4` instead of the intended `1 << ( ( 1 << 2 ) - 1 ) == 1 << ( 4 - 1 ) == 8`. This commit fixes this by adding parentheses about the `id` parameter in the definition of `MBEDTLS_X509_ID_FLAG`. |
||
---|---|---|
.. | ||
mbedtls | ||
.gitignore | ||
CMakeLists.txt |