From 575766e5e7b14577bc5184e200abdb4dfa7f513c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 25 Aug 2003 11:28:46 +0000 Subject: [PATCH] (elem_insert): fix a off by one index counter git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12628 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/krb5/sequence.c | 2 +- lib/gssapi/sequence.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gssapi/krb5/sequence.c b/lib/gssapi/krb5/sequence.c index 3b0d862c4..d9a5f9c01 100644 --- a/lib/gssapi/krb5/sequence.c +++ b/lib/gssapi/krb5/sequence.c @@ -105,7 +105,7 @@ elem_insert(struct gss_msg_order *o, if (o->length > after_slot) memmove(&o->elem[after_slot + 1], &o->elem[after_slot], - (o->length - after_slot) * sizeof(o->elem[0])); + (o->length - after_slot - 1) * sizeof(o->elem[0])); elem_set(o, after_slot, seq_num); diff --git a/lib/gssapi/sequence.c b/lib/gssapi/sequence.c index 3b0d862c4..d9a5f9c01 100644 --- a/lib/gssapi/sequence.c +++ b/lib/gssapi/sequence.c @@ -105,7 +105,7 @@ elem_insert(struct gss_msg_order *o, if (o->length > after_slot) memmove(&o->elem[after_slot + 1], &o->elem[after_slot], - (o->length - after_slot) * sizeof(o->elem[0])); + (o->length - after_slot - 1) * sizeof(o->elem[0])); elem_set(o, after_slot, seq_num);