Fix overflow in mbedtls_timing_hardclock
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
01f6e61781
commit
7796cc4f24
1 changed files with 1 additions and 1 deletions
|
@ -398,7 +398,7 @@ static unsigned long mbedtls_timing_hardclock( void )
|
|||
}
|
||||
|
||||
gettimeofday( &tv_cur, NULL );
|
||||
return( ( tv_cur.tv_sec - tv_init.tv_sec ) * 1000000
|
||||
return( ( tv_cur.tv_sec - tv_init.tv_sec ) * 1000000U
|
||||
+ ( tv_cur.tv_usec - tv_init.tv_usec ) );
|
||||
}
|
||||
#endif /* !HAVE_HARDCLOCK */
|
||||
|
|
Loading…
Reference in a new issue