Re: [Freeipa-devel] [PATCH 0037] Add missing return value check to new_ldap_instance()
On Wed, Jul 18, 2012 at 02:35:20PM +0200, Petr Spacek wrote: Hello, this patch adds missing return value check to new_ldap_instance(). https://fedorahosted.org/bind-dyndb-ldap/ticket/85 Bug was reported by Coverity. Ack. From 85574b9ffe4757b93b6eb9b99ceb1172a5c37002 Mon Sep 17 00:00:00 2001 From: Petr Spacek pspa...@redhat.com Date: Wed, 18 Jul 2012 14:32:48 +0200 Subject: [PATCH] Add missing return value check to new_ldap_instance(). Signed-off-by: Petr Spacek pspa...@redhat.com --- src/ldap_helper.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/ldap_helper.c b/src/ldap_helper.c index a51a9fe384b7133b06b50a8ff498755d37dafffe..f21c449bbfe7e0cb7718ae5479989db16c103958 100644 --- a/src/ldap_helper.c +++ b/src/ldap_helper.c @@ -454,7 +454,8 @@ new_ldap_instance(isc_mem_t *mctx, const char *db_name, result = ISC_R_FAILURE; goto cleanup; } else { - str_sprintf(ldap_inst-krb5_principal, DNS/%s, hostname); + CHECK(str_sprintf(ldap_inst-krb5_principal, + DNS/%s, hostname)); log_debug(2, SASL mech GSSAPI defined but krb5_principal and sasl_user are empty, using default %s, str_buf(ldap_inst-krb5_principal)); -- 1.7.7.6 -- Adam Tkac, Red Hat, Inc. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0037] Add missing return value check to new_ldap_instance()
On 07/19/2012 01:46 PM, Adam Tkac wrote: On Wed, Jul 18, 2012 at 02:35:20PM +0200, Petr Spacek wrote: Hello, this patch adds missing return value check to new_ldap_instance(). https://fedorahosted.org/bind-dyndb-ldap/ticket/85 Bug was reported by Coverity. Ack. Pushed to master: http://git.fedorahosted.org/git?p=bind-dyndb-ldap.git;a=commitdiff;h=640511903fb2cde66dfd759a14f2fab69554f48e Petr^2 Spacek ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
[Freeipa-devel] [PATCH 0037] Add missing return value check to new_ldap_instance()
Hello, this patch adds missing return value check to new_ldap_instance(). https://fedorahosted.org/bind-dyndb-ldap/ticket/85 Bug was reported by Coverity. Petr^2 Spacek From 85574b9ffe4757b93b6eb9b99ceb1172a5c37002 Mon Sep 17 00:00:00 2001 From: Petr Spacek pspa...@redhat.com Date: Wed, 18 Jul 2012 14:32:48 +0200 Subject: [PATCH] Add missing return value check to new_ldap_instance(). Signed-off-by: Petr Spacek pspa...@redhat.com --- src/ldap_helper.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/ldap_helper.c b/src/ldap_helper.c index a51a9fe384b7133b06b50a8ff498755d37dafffe..f21c449bbfe7e0cb7718ae5479989db16c103958 100644 --- a/src/ldap_helper.c +++ b/src/ldap_helper.c @@ -454,7 +454,8 @@ new_ldap_instance(isc_mem_t *mctx, const char *db_name, result = ISC_R_FAILURE; goto cleanup; } else { - str_sprintf(ldap_inst-krb5_principal, DNS/%s, hostname); + CHECK(str_sprintf(ldap_inst-krb5_principal, + DNS/%s, hostname)); log_debug(2, SASL mech GSSAPI defined but krb5_principal and sasl_user are empty, using default %s, str_buf(ldap_inst-krb5_principal)); -- 1.7.7.6 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel