From: Christian Ambach Date: Thu, 10 Feb 2011 14:55:50 +0000 (+0100) Subject: nsswitch: fix a segfault in the krb5 locator plugin X-Git-Tag: tevent-0.9.11~754 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d62aa577c315ec7a2049d465ad3e35a6089191f3;p=thirdparty%2Fsamba.git nsswitch: fix a segfault in the krb5 locator plugin after the number of retries was exceeded, the loop did not bail out correctly with an error and went on using a null pointer --- diff --git a/nsswitch/winbind_krb5_locator.c b/nsswitch/winbind_krb5_locator.c index db6e8d0d6cf..e921caea593 100644 --- a/nsswitch/winbind_krb5_locator.c +++ b/nsswitch/winbind_krb5_locator.c @@ -192,7 +192,7 @@ static krb5_error_code smb_krb5_locator_call_cbfunc(const char *name, break; } - if (ret == EAI_AGAIN) { + if ((ret == EAI_AGAIN) && (count > 1)) { count--; continue; }