From d6c8f7cbdcee8d152095b810f6da704f520570cf Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 14 Oct 2005 22:56:55 +0000 Subject: [PATCH] pull up r17421 from trunk ticket: 3002 version_fixed: 1.4.3 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@17431 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/ktutil/ChangeLog | 5 +++++ src/kadmin/ktutil/ktutil_funcs.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/kadmin/ktutil/ChangeLog b/src/kadmin/ktutil/ChangeLog index 0202686b7..fb35124a5 100644 --- a/src/kadmin/ktutil/ChangeLog +++ b/src/kadmin/ktutil/ChangeLog @@ -1,3 +1,8 @@ +2005-10-12 Tom Yu + + * ktutil_funcs.c (ktutil_add): Fix malloc size botches reported by + Will Fiveash. + 2003-05-19 Sam Hartman * ktutil.c (main): Don't register writable keytab ops as they are diff --git a/src/kadmin/ktutil/ktutil_funcs.c b/src/kadmin/ktutil/ktutil_funcs.c index c64a41cae..649002e21 100644 --- a/src/kadmin/ktutil/ktutil_funcs.c +++ b/src/kadmin/ktutil/ktutil_funcs.c @@ -138,12 +138,12 @@ krb5_error_code ktutil_add(context, list, princ_str, kvno, memset((char *) entry, 0, sizeof(*entry)); if (!lp) { /* if list is empty, start one */ - lp = (krb5_kt_list) malloc(sizeof(krb5_kt_list)); + lp = (krb5_kt_list) malloc(sizeof(*lp)); if (!lp) { return ENOMEM; } } else { - lp->next = (krb5_kt_list) malloc(sizeof(krb5_kt_list)); + lp->next = (krb5_kt_list) malloc(sizeof(*lp)); if (!lp->next) { return ENOMEM; } -- 2.26.2