From: Ezra Peisach Date: Tue, 9 May 1995 02:40:07 +0000 (+0000) Subject: mk_faddr.c (krb5_make_fulladdr): Allocate enough memory for X-Git-Tag: krb5-1.0-beta6~2037 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cae931d3d1767d75ab0ac8c9cef76a97c2bc5e2b;p=krb5.git mk_faddr.c (krb5_make_fulladdr): Allocate enough memory for raddr contents before copying over random memory. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5760 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 59538ac65..d7f2ba158 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,5 +1,8 @@ Mon May 8 22:19:23 1995 Ezra Peisach + * mk_faddr.c (krb5_make_fulladdr): Allocate enough memory for + raddr contents. + * read_pwd.c (krb5_read_password): Make arguments prompt and prompt2 const char * for convenience to callers. diff --git a/src/lib/krb5/os/mk_faddr.c b/src/lib/krb5/os/mk_faddr.c index 8708f8f4b..86cf56132 100644 --- a/src/lib/krb5/os/mk_faddr.c +++ b/src/lib/krb5/os/mk_faddr.c @@ -49,7 +49,7 @@ krb5_make_fulladdr(context, kaddr, kport, raddr) return EINVAL; raddr->length = kaddr->length + kport->length + (4 * sizeof(krb5_int32)); - if (!(raddr->contents = (krb5_octet *)malloc(kaddr->length))) + if (!(raddr->contents = (krb5_octet *)malloc(raddr->length))) return ENOMEM; raddr->addrtype = ADDRTYPE_ADDRPORT;