]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
krb5_gss_register_acceptor_identity does not allocate enough memory for cached keytab
authorEzra Peisach <epeisach@mit.edu>
Sat, 19 Jul 2003 20:03:10 +0000 (20:03 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sat, 19 Jul 2003 20:03:10 +0000 (20:03 +0000)
* acquire_cred.c (krb5_gss_register_acceptor_identity): Allocate
enough memory to include the null at the end of the keytab char *.

Essentially off by one error.

ticket: new
target_version: 1.3.1
tags: pullup
component: krb5-libs

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

src/lib/gssapi/krb5/ChangeLog
src/lib/gssapi/krb5/acquire_cred.c

index 44ba4200ebbe401c928f4d99ef0b2c69682616bd..0fea901d3b6c873709bc8a7f057e758b3ada7d8c 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-19  Ezra Peisach  <epeisach@mit.edu>
+
+       * acquire_cred.c (krb5_gss_register_acceptor_identity): Allocate
+       enough memory to include the null at the end of the keytab char *.
+
 2003-07-17  Tom Yu  <tlyu@mit.edu>
 
        * gssapiP_krb5.h: Delete kg_release_defcred(); it's no longer
index 27cbab0bb8eb72b4e854490799c71bc4205f05f6..391575ddc97e476c9865e05b63d703597bffd864 100644 (file)
@@ -92,7 +92,7 @@ krb5_gss_register_acceptor_identity(const char *keytab)
        free(krb5_gss_keytab);
 
     len = strlen(keytab);
-    krb5_gss_keytab = malloc(len);
+    krb5_gss_keytab = malloc(len + 1);
     if (krb5_gss_keytab == NULL)
        return GSS_S_FAILURE;