mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Fix overflow in mbedtls_timing_hardclock()
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@ -223,7 +223,7 @@ unsigned long mbedtls_timing_hardclock( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
gettimeofday( &tv_cur, NULL );
|
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 ) );
|
+ ( tv_cur.tv_usec - tv_init.tv_usec ) );
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_HARDCLOCK */
|
#endif /* !HAVE_HARDCLOCK */
|
||||||
|
Reference in New Issue
Block a user