From b49b2cdabf29a360c3c55c23a81cacaade0e4f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 12 Jul 2007 13:13:40 +0000 Subject: [PATCH] Fix pointer vs strict alias rules. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21521 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/test/gssapi_client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appl/test/gssapi_client.c b/appl/test/gssapi_client.c index 744c0a04e..89ca72fe2 100644 --- a/appl/test/gssapi_client.c +++ b/appl/test/gssapi_client.c @@ -110,13 +110,15 @@ proto (int sock, const char *hostname, const char *service) u_char init_buf[4]; u_char acct_buf[4]; gss_OID mech_oid; + char *str; mech_oid = select_mech(mech); - name_token.length = asprintf ((char **)&name_token.value, + name_token.length = asprintf (&str, "%s@%s", service, hostname); - if (name_token.length == -1) + if (str == NULL) errx(1, "malloc - out of memory"); + name_token.value = str; maj_stat = gss_import_name (&min_stat, &name_token,