1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-07-03 04:53:10 +08:00
Gilles Peskine 51c2e06eb8 mpi_copy: make the 0 case slightly more robust
If Y was constructed through functions in this module, then Y->n == 0
iff Y->p == NULL. However we do not prevent filling mpi structures
manually, and zero may be represented with n=0 and p a valid pointer.
Most of the code can cope with such a representation, but for the
source of mbedtls_mpi_copy, this would cause an integer underflow.
Changing the test for zero from Y->p==NULL to Y->n==0 causes this case
to work at no extra cost.
2020-03-13 16:23:45 +00:00
..
2020-03-13 15:36:05 +00:00
2020-03-09 17:39:04 +00:00
2019-06-20 16:33:02 +01:00