You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mbed TLS build:
Version: 2.14.1
OS version: 9.0
Configuration: MBEDTLS_MPI_WINDOW_SIZE = 6 (default)
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): arm-none-eabi-gcc 6 2017-q2-update
Additional environment information: Static analyzer (Coverity)
Actual behavior
In mbedtls_mpi_exp_mod(), the comparison of wsize is always false. Coverity reports a potential issue. (line 1673, as of commit b9eb786).
Admittedly, the compiler should be able to optimize this out...
Question
Would it be appropriate to add a preprocessor guard #if (MBEDTLS_MPI_WINDOW_SIZE < 6) here? Or should the Coverity finding be treated as an intentional practice?
If a preprocessor guard is appropriate, I'm happy to create a PR.
The text was updated successfully, but these errors were encountered:
@pkolbus Thank you for raising this issue!
I agree that when MBEDTLS_MPI_WINDOW_SIZE is 6, this comparison is always false, and coverity might warn on this, therefore marking this as a bug.
You are welcome to raise a PR, assuming you have accepted our CLA.
Thanks again for your interest in Mbed TLS!
Description
Bug
OS
FreeRTOS
mbed TLS build:
Version: 2.14.1
OS version: 9.0
Configuration: MBEDTLS_MPI_WINDOW_SIZE = 6 (default)
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): arm-none-eabi-gcc 6 2017-q2-update
Additional environment information: Static analyzer (Coverity)
Actual behavior
In mbedtls_mpi_exp_mod(), the comparison of wsize is always false. Coverity reports a potential issue. (line 1673, as of commit b9eb786).
Admittedly, the compiler should be able to optimize this out...
Question
Would it be appropriate to add a preprocessor guard #if (MBEDTLS_MPI_WINDOW_SIZE < 6) here? Or should the Coverity finding be treated as an intentional practice?
If a preprocessor guard is appropriate, I'm happy to create a PR.
The text was updated successfully, but these errors were encountered: