I think the best (blind) fix consists in only performing that test if sl_mincsn is assigned a value; something like
/* Are there any log entries, and is the consumer state * present in the session log? */ - if ( sl->sl_num > 0 && ber_bvcmp( &mincsn, &sl->sl_mincsn )
= 0 ) {
+ if ( !BER_BVISEMPTY( &sl->sl_mincsn ) && + sl->sl_num > 0 && + ber_bvcmp( &mincsn, &sl->sl_mincsn ) >= 0 ) + { do_present = 0; /* mutex is unlocked in playlog */ syncprov_playlog( op, rs, sl, srs, ctxcsn, numcsns, sids );
However I'd like to hear some other opinion.
p.