krb5 commit: Fix uninitialized memory errors in t_trace.c
Greg Hudson
ghudson at MIT.EDU
Tue Jun 5 00:49:00 EDT 2012
https://github.com/krb5/krb5/commit/cbfe4fd9cad2a63199b1eb62ea93f2e5c7678978
commit cbfe4fd9cad2a63199b1eb62ea93f2e5c7678978
Author: Greg Hudson <ghudson at mit.edu>
Date: Tue Jun 5 00:43:49 2012 -0400
Fix uninitialized memory errors in t_trace.c
src/lib/krb5/os/t_trace.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/lib/krb5/os/t_trace.c b/src/lib/krb5/os/t_trace.c
index 1f2f4e0..90e814d 100644
--- a/src/lib/krb5/os/t_trace.c
+++ b/src/lib/krb5/os/t_trace.c
@@ -117,6 +117,8 @@ main (int argc, char *argv[])
addr_in->sin_family = AF_INET;
addr_in->sin_addr.s_addr = INADDR_ANY;
addr_in->sin_port = htons(88);
+ conn.addrlen = sizeof(struct sockaddr_in);
+ conn.family = AF_INET;
TRACE(ctx, "struct conn_state *, show socket type, address, port: "
"{connstate}", &conn);
conn.socktype = SOCK_DGRAM;
@@ -191,13 +193,14 @@ main (int argc, char *argv[])
padatap = malloc(sizeof(krb5_pa_data *) * 3);
padatap[0] = &padata;
- memcpy(&padata2, &padata, sizeof(padata));
padatap[1] = &padata2;
padatap[2] = NULL;
padata.magic = 0;
padata.pa_type = KRB5_PADATA_NONE;
padata.length = oct_length;
padata.contents = oct;
+ padata2 = padata;
+ padata.pa_type = KRB5_PADATA_PW_SALT;
TRACE(ctx, "krb5_pa_data **, display list of padata type numbers: "
"{patypes}", padatap);
TRACE(ctx, "krb5_pa_data **, display list of padata type numbers: "
More information about the cvs-krb5
mailing list