From 413550c5298af349627597689e4f95b622dd6c9d Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Mon, 23 May 2022 16:11:31 +0100 Subject: [PATCH] Change memcmp call Previous call used sizeof() function which is not needed. Signed-off-by: Thomas Daubney --- programs/pkey/ecdh_curve25519.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/pkey/ecdh_curve25519.c b/programs/pkey/ecdh_curve25519.c index 50c4ad85e2..6230981229 100644 --- a/programs/pkey/ecdh_curve25519.c +++ b/programs/pkey/ecdh_curve25519.c @@ -195,7 +195,7 @@ int main( int argc, char *argv[] ) mbedtls_printf( " . Check if both calculated secrets are equal..." ); fflush( stdout ); - ret = memcmp( secret_srv, secret_cli, sizeof( srv_olen ) ); + ret = memcmp( secret_srv, secret_cli, srv_olen ); if( ret != 0 || ( cli_olen != srv_olen ) ) { mbedtls_printf( " failed\n ! Shared secrets not equal.\n" );