From 818c0b2e4253514ee409698e7186af0d936f9fcd Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 6 Sep 2004 14:21:14 +0000 Subject: [PATCH] num is an unsigned long, but since it was transfered from crypto/sha/sha_locl.h, where it is in fact an int, we need to check for less-than-zero as if it was an int... --- fips/sha1/fips_sha_locl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fips/sha1/fips_sha_locl.h b/fips/sha1/fips_sha_locl.h index 84f6558459..154140d831 100644 --- a/fips/sha1/fips_sha_locl.h +++ b/fips/sha1/fips_sha_locl.h @@ -336,7 +336,7 @@ void HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, FIPS_SHA_SIZE_T num) c->h3=(c->h3+B)&0xffffffffL; c->h4=(c->h4+C)&0xffffffffL; - if (--num <= 0) break; + if ((int)(--num) <= 0) break; A=c->h0; B=c->h1; @@ -466,7 +466,7 @@ void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, FIPS_SHA_SIZE_T num) c->h3=(c->h3+B)&0xffffffffL; c->h4=(c->h4+C)&0xffffffffL; - if (--num <= 0) break; + if ((int)(--num) <= 0) break; A=c->h0; B=c->h1; -- 2.25.1