From 506a81110933aa136db205eacd09a4c58a42802d Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Mon, 18 Mar 1996 02:46:10 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/in_tkt_pwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.26.2