Uses unsigned ints for lengths
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 12 Sep 2010 16:48:47 +0000 (17:48 +0100)
committerLove Hornquist Astrand <lha@h5l.org>
Sat, 18 Sep 2010 18:30:06 +0000 (11:30 -0700)
EVP_BytesToKey uses min() on a mixture of signed and unsigned
paramters. To avoid compiler warnings, use unsigned int for all
of the iv and key lengths in this function.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
lib/hcrypto/evp.c

index 5946e848d3dd5fb8940fb1b2ffce546c21129972..da1a8940be865962f20a75b18832c436d9d932c0 100644 (file)
@@ -1314,7 +1314,8 @@ EVP_BytesToKey(const EVP_CIPHER *type,
               void *keydata,
               void *ivdata)
 {
-    int ivlen, keylen, first = 0;
+    unsigned int ivlen, keylen;
+    int first = 0;
     unsigned int mds = 0, i;
     unsigned char *key = keydata;
     unsigned char *iv = ivdata;