zero-based arrays for keytype/etype max
authorJohn Kohl <jtkohl@mit.edu>
Thu, 10 May 1990 15:37:02 +0000 (15:37 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 10 May 1990 15:37:02 +0000 (15:37 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@823 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/cryptoconf.c

index 5a60bc8b233887ac6412fb5c86e8ffdb7106a4e0..047e1c7a54a40ac926641c842714eef53c12b539 100644 (file)
@@ -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,