From: Pierangelo Masarati Date: Tue, 8 Nov 2005 00:03:58 +0000 (+0000) Subject: error if syncUUID is empty X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=52db580cdb1e8d3297b354066cf035b0ebe88e2a;p=openldap error if syncUUID is empty --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 4c1cbf49f0..066218f95a 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -691,7 +691,14 @@ do_syncrep2( rctrlp = *rctrls; ber_init2( ber, &rctrlp->ldctl_value, LBER_USE_DER ); ber_scanf( ber, "{em" /*"}"*/, &syncstate, &syncUUID ); - /* FIXME: what if syncUUID is NULL or empty? */ + /* FIXME: what if syncUUID is NULL or empty? + * (happens with back-sql...) */ + if ( BER_BVISEMPTY( &syncUUID ) ) { + Debug( LDAP_DEBUG_ANY, "do_syncrep2: " + "got empty syncUUID\n", 0, 0, 0 ); + rc = -1; + goto done; + } if ( ber_peek_tag( ber, &len ) == LDAP_TAG_SYNC_COOKIE ) { ber_scanf( ber, /*"{"*/ "m}", &cookie ); if ( !BER_BVISNULL( &cookie ) ) {