]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
allow proxying of dynamic objects (irrespective of the support provided to dynamic...
[openldap] / servers / slapd / modify.c
index ff7669dca86fd5f7ba49b6ad84aff79160b69dd1..05891b3dbef9e8be60367ff572ea9329f5105e2f 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -835,11 +835,11 @@ void slap_mods_opattrs(
                        csn = op->o_csn;
                }
                ptr = ber_bvchr( &csn, '#' );
-               if ( ptr && ptr < &csn.bv_val[csn.bv_len] ) {
+               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();