]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorPierangelo Masarati <ando@openldap.org>
Fri, 6 Jan 2006 16:23:17 +0000 (16:23 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 6 Jan 2006 16:23:17 +0000 (16:23 +0000)
servers/slapd/add.c

index 3a022e85962e6e6ab4105473b514905283c5a553..9056e412ae07eda7200489ff8a0ff7b6f64df903 100644 (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();