mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
In some contexts, the output pointer may equal the first input pointer, in which case copying is not only superfluous but results in "Source and destination overlap in memcpy" errors from Valgrind (as I observed in the context of ecp_double_jac) and a diagnostic message from TrustInSoft Analyzer (as Pascal Cuoq reported in the context of other ECP functions called by cert-app with a suitable certificate). Signed-off-by: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
5 lines
196 B
Plaintext
5 lines
196 B
Plaintext
Bugfix
|
|
* Fix potential undefined behavior in mbedtls_mpi_sub_abs(). Reported by
|
|
Pascal Cuoq using TrustInSoft Analyzer in #6701; observed independently by
|
|
Aaron Ucko under Valgrind.
|