From 259576387cd17febaf6f588006c3810057e1d074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 12 Jul 2007 13:15:04 +0000 Subject: [PATCH] Fix pointer vs strict alias rules. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21522 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/test/nt_gss_client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/appl/test/nt_gss_client.c b/appl/test/nt_gss_client.c index 4edacfabc..b3b4d6d53 100644 --- a/appl/test/nt_gss_client.c +++ b/appl/test/nt_gss_client.c @@ -55,9 +55,13 @@ proto (int sock, const char *hostname, const char *service) OM_uint32 maj_stat, min_stat; gss_name_t server; gss_buffer_desc name_token; + char *str; - name_token.length = asprintf ((char **)&name_token.value, + name_token.length = asprintf (&str, "%s@%s", service, hostname); + if (str == NULL) + errx(1, "out of memory"); + name_token.value = str; maj_stat = gss_import_name (&min_stat, &name_token,