From 216c2ffb30db4b9f8f7899666752226f405ce336 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 6 Feb 2009 05:42:32 +0000 Subject: [PATCH] Unsigned/signed fixes git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21908 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/enc_provider/aes.c | 3 ++- src/lib/crypto/enc_provider/des.c | 2 +- src/lib/crypto/enc_provider/des3.c | 4 ++-- src/lib/crypto/string_to_enctype.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/crypto/enc_provider/aes.c b/src/lib/crypto/enc_provider/aes.c index d821cf461..060d119c4 100644 --- a/src/lib/crypto/enc_provider/aes.c +++ b/src/lib/crypto/enc_provider/aes.c @@ -286,7 +286,8 @@ krb5int_aes_decrypt_iov(const krb5_keyblock *key, { aes_ctx ctx; char tmp[BLOCK_SIZE], tmp2[BLOCK_SIZE], tmp3[BLOCK_SIZE]; - int nblocks = 0, blockno, i; + int nblocks = 0, blockno; + unsigned int i; size_t input_length; CHECK_SIZES; diff --git a/src/lib/crypto/enc_provider/des.c b/src/lib/crypto/enc_provider/des.c index 63c43517e..547f6b976 100644 --- a/src/lib/crypto/enc_provider/des.c +++ b/src/lib/crypto/enc_provider/des.c @@ -113,7 +113,7 @@ k5_des_docrypt_iov(const krb5_keyblock *key, const krb5_data *ivec, { mit_des_key_schedule schedule; size_t input_length = 0; - int i; + unsigned int i; /* key->enctype was checked by the caller */ diff --git a/src/lib/crypto/enc_provider/des3.c b/src/lib/crypto/enc_provider/des3.c index e7a07f64c..412c994a7 100644 --- a/src/lib/crypto/enc_provider/des3.c +++ b/src/lib/crypto/enc_provider/des3.c @@ -177,7 +177,7 @@ k5_des3_encrypt_iov(const krb5_keyblock *key, /* this has a return value, but the code always returns zero */ krb5int_des3_cbc_encrypt_iov(data, num_data, schedule[0], schedule[1], schedule[2], - ivec != NULL ? (const unsigned char *) ivec->data : NULL); + ivec != NULL ? (unsigned char *) ivec->data : NULL); zap(schedule, sizeof(schedule)); @@ -200,7 +200,7 @@ k5_des3_decrypt_iov(const krb5_keyblock *key, /* this has a return value, but the code always returns zero */ krb5int_des3_cbc_decrypt_iov(data, num_data, schedule[0], schedule[1], schedule[2], - ivec != NULL ? (const unsigned char *) ivec->data : NULL); + ivec != NULL ? (unsigned char *) ivec->data : NULL); zap(schedule, sizeof(schedule)); diff --git a/src/lib/crypto/string_to_enctype.c b/src/lib/crypto/string_to_enctype.c index cda663420..5c6ae1cad 100644 --- a/src/lib/crypto/string_to_enctype.c +++ b/src/lib/crypto/string_to_enctype.c @@ -30,7 +30,7 @@ krb5_error_code KRB5_CALLCONV krb5_string_to_enctype(char *string, krb5_enctype *enctypep) { - int i, j; + unsigned int i, j; for (i=0; i