From 874f4db44de96a2a069873c4ce4763e30fa0ce67 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 29 Apr 1995 04:44:39 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/ChangeLog | 3 +++ src/lib/krb5/krb/srv_rcache.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 + * 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])) -- 2.26.2