Fix fencepost error which caused an access beyond the allocated memory
authorTheodore Tso <tytso@mit.edu>
Sat, 29 Apr 1995 04:44:39 +0000 (04:44 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 29 Apr 1995 04:44:39 +0000 (04:44 +0000)
of piece->data.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5658 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/srv_rcache.c

index 353671d465eebda4eec3a0fbdb0726dcea5264c6..665724bea8f1d0adf6f8748c3a717f0327b9f871 100644 (file)
@@ -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.
 
index a2534318dce846481a6d3cc9281404125d182d16..32e87f4e6f2927a9aa74d4d2c60218329eb36b29 100644 (file)
@@ -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]))