]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/add.c
Add pointer to an existing document since the netscape.com URLs are dead.
[openldap] / servers / slapd / add.c
index db9b809752342a1baf28f6fe5afdf6c8dadb1d6d..8d22d54afc255c11b7a4279192511b2cc75d4713 100644 (file)
@@ -608,10 +608,9 @@ int slap_add_opattrs(
                }
                ptr = ber_bvchr( &csn, '#' );
                if ( ptr ) {
-                       timestamp.bv_len = ptr - csn.bv_val;
-                       if ( timestamp.bv_len >= sizeof(timebuf) )      /* ?!? */
-                               timestamp.bv_len = sizeof(timebuf) - 1;
+                       timestamp.bv_len = STRLENOF("YYYYMMDDHHMMSSZ");
                        AC_MEMCPY( timebuf, csn.bv_val, timestamp.bv_len );
+                       timebuf[timestamp.bv_len-1] = 'Z';
                        timebuf[timestamp.bv_len] = '\0';
                } else {
                        time_t now = slap_get_time();