From b23a8abc3f5ada75b9d6ddf10b69bf435e2ac71f Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 10 May 1990 15:37:02 +0000 Subject: [PATCH] zero-based arrays for keytype/etype max git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@823 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/cryptoconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/crypto/cryptoconf.c b/src/lib/crypto/cryptoconf.c index 5a60bc8b2..047e1c7a5 100644 --- a/src/lib/crypto/cryptoconf.c +++ b/src/lib/crypto/cryptoconf.c @@ -63,7 +63,7 @@ krb5_cs_table_entry *krb5_csarray[] = { LUCIFER_CRC_CSENTRY, }; -int krb5_max_cryptosystem = sizeof(krb5_csarray)/sizeof(krb5_csarray[0]); +int krb5_max_cryptosystem = sizeof(krb5_csarray)/sizeof(krb5_csarray[0]) - 1; krb5_cs_table_entry *krb5_keytype_array[] = { 0, @@ -71,7 +71,7 @@ krb5_cs_table_entry *krb5_keytype_array[] = { LUCIFER_CRC_CSENTRY, }; -int krb5_max_keytype = sizeof(krb5_keytype_array)/sizeof(krb5_keytype_array[0]); +int krb5_max_keytype = sizeof(krb5_keytype_array)/sizeof(krb5_keytype_array[0]) - 1; krb5_checksum_entry *krb5_cksumarray[] = { 0, -- 2.26.2