From bd0d19d85626d78f0167a3ec0171cd3e1a7d1f44 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 29 Aug 2006 16:04:37 +0000 Subject: [PATCH] r17915: Saturn fixes --- source/libads/ldap.c | 2 +- source/libads/sasl.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libads/ldap.c b/source/libads/ldap.c index ac736fa4f3f..c49e3480b80 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -496,7 +496,7 @@ ADS_STATUS ads_do_paged_search_args(ADS_STRUCT *ads, const char *bind_path, } cookie_be = ber_alloc_t(LBER_USE_DER); - if (cookie && *cookie) { + if (*cookie) { ber_printf(cookie_be, "{iO}", (ber_int_t) 1000, *cookie); ber_bvfree(*cookie); /* don't need it from last time */ *cookie = NULL; diff --git a/source/libads/sasl.c b/source/libads/sasl.c index a12af43eb37..52a0f0b165c 100644 --- a/source/libads/sasl.c +++ b/source/libads/sasl.c @@ -276,9 +276,8 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) int i=0; int gss_rc, rc; uint8 *p; - uint32 max_msg_size; + uint32 max_msg_size = 0; char *sname; - unsigned sec_layer; ADS_STATUS status; krb5_principal principal; krb5_context ctx = NULL; @@ -390,8 +389,9 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) #if 0 file_save("sasl_gssapi.dat", output_token.value, output_token.length); #endif - max_msg_size = (p[1]<<16) | (p[2]<<8) | p[3]; - sec_layer = *p; + if (p) { + max_msg_size = (p[1]<<16) | (p[2]<<8) | p[3]; + } gss_release_buffer(&minor_status, &output_token); -- 2.11.4.GIT