mk_faddr.c (krb5_make_fulladdr): Allocate enough memory for
authorEzra Peisach <epeisach@mit.edu>
Tue, 9 May 1995 02:40:07 +0000 (02:40 +0000)
committerEzra Peisach <epeisach@mit.edu>
Tue, 9 May 1995 02:40:07 +0000 (02:40 +0000)
raddr contents before copying over random memory.

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

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/mk_faddr.c

index 59538ac658739aec20e47c50019fef0efc1d1ea3..d7f2ba1588f059d71c205b06e2b6f5c734d4071f 100644 (file)
@@ -1,5 +1,8 @@
 Mon May  8 22:19:23 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
+       * 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.
 
index 8708f8f4b603805218c503caeaf6f15ea7ad3fc3..86cf561326600de9da7eb60299f375ec31d52ec2 100644 (file)
@@ -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;