From: Howard Chu Date: Mon, 6 Dec 2004 03:37:06 +0000 (+0000) Subject: Don't assert on short time strings, just ignore them. X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~121 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ee01d03766f43c4948a5171131d7e9ed390e4a46;p=openldap Don't assert on short time strings, just ignore them. --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index e8c97c30e9..95190c9053 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -2732,9 +2732,9 @@ int generalizedTimeFilter( keys = slap_sl_malloc( sizeof( struct berval ) * 2, ctx ); /* GeneralizedTime YYYYmmddHH[MM[SS]][(./,)d...](Z|(+/-)HH[MM]) */ - assert(value->bv_val != NULL && value->bv_len >= 10); /* Use 40 bits of time for key */ - if ( lutil_parsetime( value->bv_val, &tm ) == 0 ) { + if ( value->bv_val && value->bv_len >= 10 && + lutil_parsetime( value->bv_val, &tm ) == 0 ) { lutil_tm2time( &tm, &tt ); tmp[0] = tt.tt_gsec & 0xff; tmp[4] = tt.tt_sec & 0xff;