X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fmodify.c;h=05891b3dbef9e8be60367ff572ea9329f5105e2f;hb=18beda81a0e6b476afbef81e5fd676804142ca32;hp=ff7669dca86fd5f7ba49b6ad84aff79160b69dd1;hpb=266c6ad1ea68a0db48359b0d5c3b04de668f18f1;p=openldap diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index ff7669dca8..05891b3dbe 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * 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();