mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-28 09:39:53 +00:00
Fix off-by-one error
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
66433444fc
commit
c58858865b
@ -89,7 +89,7 @@ extern void (*mbedtls_test_hook_test_fail)( const char * test, int line, const c
|
||||
inline void mbedtls_xor( unsigned char *r, unsigned char const *a, unsigned char const *b, size_t n )
|
||||
{
|
||||
size_t i;
|
||||
for ( i = 0; ( i + 4 ) < n; i+= 4 )
|
||||
for ( i = 0; ( i + 4 ) <= n; i += 4 )
|
||||
{
|
||||
uint32_t x = mbedtls_get_unaligned_uint32( a + i ) ^ mbedtls_get_unaligned_uint32( b + i );
|
||||
mbedtls_put_unaligned_uint32( r + i, x );
|
||||
|
Loading…
x
Reference in New Issue
Block a user