From: Mark Eichin Date: Mon, 18 Mar 1996 02:46:10 +0000 (+0000) Subject: malloc the new length, not the old, esp. since we just check that the X-Git-Tag: krb5-1.0-beta6~348 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=506a81110933aa136db205eacd09a4c58a42802d;p=krb5.git malloc the new length, not the old, esp. since we just check that the old length was zero git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7654 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/in_tkt_pwd.c b/src/lib/krb5/krb/in_tkt_pwd.c index ce954a7d8..52ef240b9 100644 --- a/src/lib/krb5/krb/in_tkt_pwd.c +++ b/src/lib/krb5/krb/in_tkt_pwd.c @@ -60,7 +60,7 @@ pwd_keyproc(context, type, salt, keyseed, key) if (!password->length) { pwsize = BUFSIZ; - if ((password->data = malloc(password->length)) == NULL) + if ((password->data = malloc(pwsize)) == NULL) return ENOMEM; if ((retval = krb5_read_password(context, krb5_default_pwd_prompt1, 0,