From 52db580cdb1e8d3297b354066cf035b0ebe88e2a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 8 Nov 2005 00:03:58 +0000 Subject: [PATCH] error if syncUUID is empty --- servers/slapd/syncrepl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 ) ) { -- 2.39.5