Fix varrious signed/unsigned comparisons.

This commit is contained in:
Gregory Maxwell
2014-11-12 13:45:09 -08:00
parent e9e0e21a6f
commit 65a14abb48
4 changed files with 8 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const sec
}
int shift = 0;
while (shift < len && tmp[shift] == 0) shift++;
VERIFY_CHECK(len-shift <= rlen);
VERIFY_CHECK(len-shift <= (int)rlen);
memset(r, 0, rlen - len + shift);
if (len > shift) {
memcpy(r + rlen - len + shift, tmp + shift, len - shift);