This commit is contained in:
Pierangelo Masarati 2006-01-06 16:23:17 +00:00
parent 5354f2d4e6
commit 2c21dbd56f

View file

@ -668,9 +668,9 @@ int slap_add_opattrs(
ptr = ber_bvchr( &csn, '#' );
if ( ptr ) {
timestamp.bv_len = ptr - csn.bv_val;
if ( timestamp.bv_len >= sizeof(timebuf) )
if ( timestamp.bv_len >= sizeof(timebuf) ) /* ?!? */
timestamp.bv_len = sizeof(timebuf) - 1;
strncpy( timebuf, csn.bv_val, timestamp.bv_len );
AC_MEMCPY( timebuf, csn.bv_val, timestamp.bv_len );
timebuf[timestamp.bv_len] = '\0';
} else {
time_t now = slap_get_time();