summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-04-29 04:44:39 +0000
committerTheodore Tso <tytso@mit.edu>1995-04-29 04:44:39 +0000
commit874f4db44de96a2a069873c4ce4763e30fa0ce67 (patch)
tree99645d1bd4332dc2b1388be8fac4837624e64a3b
parent913b16c5efda182a7a149cf2f422a2cfe711d760 (diff)
downloadkrb5-874f4db44de96a2a069873c4ce4763e30fa0ce67.tar.gz
krb5-874f4db44de96a2a069873c4ce4763e30fa0ce67.tar.xz
krb5-874f4db44de96a2a069873c4ce4763e30fa0ce67.zip
Fix fencepost error which caused an access beyond the allocated memory
of piece->data. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5658 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb5/krb/ChangeLog3
-rw-r--r--src/lib/krb5/krb/srv_rcache.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog
index 353671d46..665724bea 100644
--- a/src/lib/krb5/krb/ChangeLog
+++ b/src/lib/krb5/krb/ChangeLog
@@ -1,5 +1,8 @@
Sat Apr 29 00:09:40 1995 Theodore Y. Ts'o <tytso@dcl>
+ * srv_rcache.c (krb5_get_server_rcache): Fix fencepost error which
+ caused an access beyond the allocated memory of piece->data.
+
* rd_priv.c (krb5_rd_priv_basic): Call krb5_free_priv_enc_part to free
the entire privenc_msg structure.
diff --git a/src/lib/krb5/krb/srv_rcache.c b/src/lib/krb5/krb/srv_rcache.c
index a2534318d..32e87f4e6 100644
--- a/src/lib/krb5/krb/srv_rcache.c
+++ b/src/lib/krb5/krb/srv_rcache.c
@@ -49,7 +49,7 @@ krb5_get_server_rcache(context, piece, rcptr)
if (retval) goto cleanup;
len = piece->length + 3 + 1;
- for (i = 0; i <= piece->length; i++) {
+ for (i = 0; i < piece->length; i++) {
if (piece->data[i] == '\\')
len++;
else if (!isgraph(piece->data[i]))