From: John Kohl Date: Thu, 10 May 1990 15:37:02 +0000 (+0000) Subject: zero-based arrays for keytype/etype max X-Git-Tag: krb5-1.0-alpha2~582 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b23a8abc3f5ada75b9d6ddf10b69bf435e2ac71f;p=krb5.git zero-based arrays for keytype/etype max git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@823 dc483132-0cff-0310-8789-dd5450dbe970 --- 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,