summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2010-01-20 17:35:10 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-02-12 08:44:10 -0500
commit152f9e939f91d94e6f30391182fd72d9267ec6e1 (patch)
tree3e54dbb398434b8dea28988fbb87deb8faf6a288
parent20f7be44229515fafaf034c516ffc328e5293e52 (diff)
downloadsssd-152f9e939f91d94e6f30391182fd72d9267ec6e1.tar.gz
sssd-152f9e939f91d94e6f30391182fd72d9267ec6e1.tar.xz
sssd-152f9e939f91d94e6f30391182fd72d9267ec6e1.zip
Don't pass a variable as format to talloc_asprintf()
This practice is not recommended and can also be dangerous.
-rw-r--r--server/providers/ipa/ipa_common.c2
-rw-r--r--server/providers/krb5/krb5_common.c2
2 files changed, 2 insertions, 2 deletions
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;