error if syncUUID is empty

This commit is contained in:
Pierangelo Masarati 2005-11-08 00:03:58 +00:00
parent 6f9aa99d0c
commit 52db580cdb

View file

@ -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 ) ) {