summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ZCkZAut.c2
-rw-r--r--server/kstuff.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/ZCkZAut.c b/lib/ZCkZAut.c
index 2110871..19ec6d1 100644
--- a/lib/ZCkZAut.c
+++ b/lib/ZCkZAut.c
@@ -102,7 +102,7 @@ Code_t ZCheckZcodeAuthentication(ZNotice_t *notice,
*/
cksum1_base = notice->z_multinotice;
if (notice->z_num_other_fields)
- x = notice->z_other_fields[notice->z_num_other_fields];
+ x = notice->z_other_fields[notice->z_num_other_fields - 1];
else
x = cksum1_base + strlen(cksum1_base) + 1; /* multiuid */
cksum1_len = x + strlen(x) + 1 - cksum1_base;
diff --git a/server/kstuff.c b/server/kstuff.c
index ba50fdc..5ae30d4 100644
--- a/server/kstuff.c
+++ b/server/kstuff.c
@@ -720,7 +720,7 @@ ZCheckAuthentication(ZNotice_t *notice,
*/
cksum1_base = notice->z_multinotice;
if (notice->z_num_other_fields)
- x = notice->z_other_fields[notice->z_num_other_fields];
+ x = notice->z_other_fields[notice->z_num_other_fields - 1];
else
x = cksum1_base + strlen(cksum1_base) + 1; /* multiuid */
cksum1_len = x + strlen(x) + 1 - cksum1_base;