From 152f9e939f91d94e6f30391182fd72d9267ec6e1 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Wed, 20 Jan 2010 17:35:10 +0100 Subject: Don't pass a variable as format to talloc_asprintf() This practice is not recommended and can also be dangerous. --- server/providers/ipa/ipa_common.c | 2 +- server/providers/krb5/krb5_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/providers/ipa/ipa_common.c b/server/providers/ipa/ipa_common.c index 5ef19da76..5e097a17c 100644 --- a/server/providers/ipa/ipa_common.c +++ b/server/providers/ipa/ipa_common.c @@ -474,7 +474,7 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server) return; } - address = talloc_asprintf(service, srvaddr->h_name); + address = talloc_asprintf(service, "%s", srvaddr->h_name); if (!address) { DEBUG(1, ("Failed to copy address ...\n")); return; diff --git a/server/providers/krb5/krb5_common.c b/server/providers/krb5/krb5_common.c index b1cf42014..86676f44c 100644 --- a/server/providers/krb5/krb5_common.c +++ b/server/providers/krb5/krb5_common.c @@ -261,7 +261,7 @@ static void krb5_resolve_callback(void *private_data, struct fo_server *server) return; } - address = talloc_asprintf(krb5_service, srvaddr->h_name); + address = talloc_asprintf(krb5_service, "%s", srvaddr->h_name); if (!address) { DEBUG(1, ("Failed to copy address ...\n")); return; -- cgit