mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 00:55:39 +01:00
Fix less-than-zero checks on unsigned numbers
This commit is contained in:
parent
4a9dc2a474
commit
12895d15f8
@ -199,7 +199,7 @@ void md4_update( md4_context *ctx, const unsigned char *input, size_t ilen )
|
||||
size_t fill;
|
||||
uint32_t left;
|
||||
|
||||
if( ilen <= 0 )
|
||||
if( ilen == 0 )
|
||||
return;
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
|
@ -218,7 +218,7 @@ void md5_update( md5_context *ctx, const unsigned char *input, size_t ilen )
|
||||
size_t fill;
|
||||
uint32_t left;
|
||||
|
||||
if( ilen <= 0 )
|
||||
if( ilen == 0 )
|
||||
return;
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
|
@ -280,7 +280,7 @@ void ripemd160_update( ripemd160_context *ctx,
|
||||
size_t fill;
|
||||
uint32_t left;
|
||||
|
||||
if( ilen <= 0 )
|
||||
if( ilen == 0 )
|
||||
return;
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
|
@ -252,7 +252,7 @@ void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen )
|
||||
size_t fill;
|
||||
uint32_t left;
|
||||
|
||||
if( ilen <= 0 )
|
||||
if( ilen == 0 )
|
||||
return;
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
|
@ -249,7 +249,7 @@ void sha256_update( sha256_context *ctx, const unsigned char *input,
|
||||
size_t fill;
|
||||
uint32_t left;
|
||||
|
||||
if( ilen <= 0 )
|
||||
if( ilen == 0 )
|
||||
return;
|
||||
|
||||
left = ctx->total[0] & 0x3F;
|
||||
|
@ -242,7 +242,7 @@ void sha512_update( sha512_context *ctx, const unsigned char *input,
|
||||
size_t fill;
|
||||
unsigned int left;
|
||||
|
||||
if( ilen <= 0 )
|
||||
if( ilen == 0 )
|
||||
return;
|
||||
|
||||
left = (unsigned int) (ctx->total[0] & 0x7F);
|
||||
|
Loading…
Reference in New Issue
Block a user