From: ryan@nardis.ca Date: Fri, 27 Jun 2014 02:18:13 +0000 (+0000) Subject: ITS#7851 contrib pw-sha2 fix int/size_t comparison X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b54ae0e2bd9ec9a398f971fef2e5a65d4331ea47;p=openldap ITS#7851 contrib pw-sha2 fix int/size_t comparison --- diff --git a/contrib/slapd-modules/passwd/sha2/slapd-sha2.c b/contrib/slapd-modules/passwd/sha2/slapd-sha2.c index 1ec79896eb..2e4fcb01db 100644 --- a/contrib/slapd-modules/passwd/sha2/slapd-sha2.c +++ b/contrib/slapd-modules/passwd/sha2/slapd-sha2.c @@ -244,7 +244,7 @@ static int chk_ssha256( rc = lutil_b64_pton(passwd->bv_val, orig_pass, decode_len); - if( rc <= sizeof(SHAdigest) ) { + if( rc <= (int)(sizeof(SHAdigest)) ) { ber_memfree(orig_pass); return LUTIL_PASSWD_ERR; } @@ -332,7 +332,7 @@ static int chk_ssha384( rc = lutil_b64_pton(passwd->bv_val, orig_pass, decode_len); - if( rc <= sizeof(SHAdigest) ) { + if( rc <= (int)(sizeof(SHAdigest)) ) { ber_memfree(orig_pass); return LUTIL_PASSWD_ERR; } @@ -420,7 +420,7 @@ static int chk_ssha512( rc = lutil_b64_pton(passwd->bv_val, orig_pass, decode_len); - if( rc <= sizeof(SHAdigest) ) { + if( rc <= (int)(sizeof(SHAdigest)) ) { ber_memfree(orig_pass); return LUTIL_PASSWD_ERR; }