Fix pointer vs strict alias rules.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21516 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-07-12 12:47:23 +00:00
parent e80e8fcc08
commit 9e42eb9529

View File

@@ -300,6 +300,7 @@ send_krb5_auth(int s,
krb5_auth_context auth_context = NULL; krb5_auth_context auth_context = NULL;
const char *protocol_string = NULL; const char *protocol_string = NULL;
krb5_flags ap_opts; krb5_flags ap_opts;
char *str;
status = krb5_sname_to_principal(context, status = krb5_sname_to_principal(context,
hostname, hostname,
@@ -319,16 +320,17 @@ send_krb5_auth(int s,
&do_encrypt); &do_encrypt);
} }
cksum_data.length = asprintf ((char **)&cksum_data.data, cksum_data.length = asprintf (&str,
"%u:%s%s%s", "%u:%s%s%s",
ntohs(socket_get_port(thataddr)), ntohs(socket_get_port(thataddr)),
do_encrypt ? "-x " : "", do_encrypt ? "-x " : "",
cmd, cmd,
remote_user); remote_user);
if (cksum_data.length == -1) { if (str == NULL) {
warnx ("%s: failed to allocate command", hostname); warnx ("%s: failed to allocate command", hostname);
return 1; return 1;
} }
cksum_data.data = str;
ap_opts = 0; ap_opts = 0;