mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 01:25:41 +00:00
Fix incrementing pointer instead of value
This was introduced by a hasty search-and-replace that didn't account for C's operator precedence when changing those variables to pointer types.
This commit is contained in:
parent
d27a88438f
commit
ee4ba54d8d
|
@ -298,7 +298,7 @@ static int ecdsa_sign_restartable( mbedtls_ecp_group *grp,
|
||||||
*p_sign_tries = 0;
|
*p_sign_tries = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if( *p_sign_tries++ > 10 )
|
if( (*p_sign_tries)++ > 10 )
|
||||||
{
|
{
|
||||||
ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
|
ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -311,7 +311,7 @@ static int ecdsa_sign_restartable( mbedtls_ecp_group *grp,
|
||||||
*p_key_tries = 0;
|
*p_key_tries = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if( *p_key_tries++ > 10 )
|
if( (*p_key_tries)++ > 10 )
|
||||||
{
|
{
|
||||||
ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
|
ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
Loading…
Reference in a new issue