mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-17 02:43:26 +00:00
psa_util: invert check order for leading zeros in convert_der_to_raw_single_int()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
efcc555002
commit
3122f4da50
@ -489,7 +489,7 @@ static int convert_der_to_raw_single_int(unsigned char *der, size_t der_len,
|
||||
}
|
||||
|
||||
/* Skip possible leading zero */
|
||||
if ((*p == 0x00) && (unpadded_len > 0)) {
|
||||
if ((unpadded_len > 0) && (*p == 0x00)) {
|
||||
p++;
|
||||
unpadded_len--;
|
||||
/* It should never happen that the input number is all zeros. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user