]> git.sur5r.net Git - openldap/commitdiff
s/SAFEMEMCPY/AC_MEMCPY/
authorKurt Zeilenga <kurt@openldap.org>
Fri, 28 Jul 2000 01:07:07 +0000 (01:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 28 Jul 2000 01:07:07 +0000 (01:07 +0000)
Use AC_FMEMCPY where appropriate (-llber)

52 files changed:
clients/ud/print.c
clients/ud/string_to_key.c
clients/ud/util.c
libraries/liblber/encode.c
libraries/liblber/io.c
libraries/liblber/memory.c
libraries/liblber/options.c
libraries/liblber/sockbuf.c
libraries/libldap/cache.c
libraries/libldap/cldap.c
libraries/libldap/controls.c
libraries/libldap/dsparse.c
libraries/libldap/getdn.c
libraries/libldap/getentry.c
libraries/libldap/getfilter.c
libraries/libldap/kbind.c
libraries/libldap/open.c
libraries/libldap/os-ip.c
libraries/libldap/references.c
libraries/libldap/tmplout.c
libraries/libldap/ufn.c
libraries/libldap/util-int.c
libraries/libldbm/ldbm.c
libraries/libldif/fetch.c
libraries/libldif/line64.c
libraries/liblunicode/ucdata/ucgendat.c
libraries/liblunicode/ure/ure.c
libraries/liblutil/entropy.c
libraries/liblutil/md5.c
libraries/liblutil/passwd.c
libraries/liblutil/sha1.c
servers/slapd/acl.c
servers/slapd/add.c
servers/slapd/at.c
servers/slapd/back-ldbm/alias.c
servers/slapd/back-ldbm/dn2id.c
servers/slapd/back-ldbm/idl.c
servers/slapd/back-ldbm/nextid.c
servers/slapd/back-ldbm/tools.c
servers/slapd/backend.c
servers/slapd/config.c
servers/slapd/daemon.c
servers/slapd/kerberos.c
servers/slapd/mr.c
servers/slapd/oc.c
servers/slapd/result.c
servers/slapd/schema_init.c
servers/slapd/sets.c
servers/slapd/syntax.c
servers/slurpd/config.c
servers/slurpd/re.c
tests/progs/slapd-addel.c

index 9275f6d07cf8ae38dd0cee15c2a6cac6ba1abee7..6f9afab38729e8a44c8df31928403c8fa846bf22 100644 (file)
@@ -603,7 +603,7 @@ time2text( char *ldtimestr, int dateonly )
 
     timestr[ strlen( timestr ) - 1 ] = zone;   /* replace trailing newline */
     if ( dateonly ) {
-       SAFEMEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
+               AC_MEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
     }
 
     return( strdup( timestr ) );
index 120cde80cfddbb7a7377af594b3e8d4d6c71cbce..66d2eb664302825d724d7c5600b7065b44eaa8ed 100644 (file)
@@ -208,13 +208,13 @@ StringToKey(
         strncat (password, cell, sizeof(password)-passlen);
     if ((passlen = strlen(password)) > sizeof(password)) passlen = sizeof(password);
 
-    memcpy(ivec, "kerberos", 8);
-    memcpy(temp_key, "kerberos", 8);
+    AC_MEMCPY(ivec, "kerberos", 8);
+    AC_MEMCPY(temp_key, "kerberos", 8);
     des_fixup_key_parity (temp_key);
     des_key_sched (temp_key, schedule);
     des_cbc_cksum (password, ivec, passlen, schedule, ivec);
 
-    memcpy(temp_key, ivec, 8);
+    AC_MEMCPY(temp_key, ivec, 8);
     des_fixup_key_parity (temp_key);
     des_key_sched (temp_key, schedule);
     des_cbc_cksum (password, key, passlen, schedule, ivec);
index 603d2c770dc685c4b302001eea25a26502fbd14b..16253263a49f0f76b044808894363f169fe5e497 100644 (file)
@@ -92,7 +92,7 @@ fetch_buffer( char *buffer, int length, FILE *where )
                if ( isprint( (unsigned char) *p )) {
                        ++p;
                } else {
-                       SAFEMEMCPY( p, p + 1, strlen( p + 1 ) + 1 ); 
+                       AC_MEMCPY( p, p + 1, strlen( p + 1 ) + 1 ); 
                }
        }
 
index 00bcf197af9de4980d60376624191b067cfd7e4b..ff3bf64be3dc422c459157f916bcb8dabb8e84e4 100644 (file)
@@ -533,7 +533,7 @@ ber_put_seqorset( BerElement *ber )
                                 * the length field.  Move the data if
                                 * we don't actually need that much
                                 */
-                               SAFEMEMCPY( (*sos)->sos_first + taglen +
+                               AC_MEMCPY( (*sos)->sos_first + taglen +
                                    lenlen, (*sos)->sos_first + taglen +
                                    FOUR_BYTE_LEN, len );
                        }
@@ -583,7 +583,7 @@ ber_put_seqorset( BerElement *ber )
                        tmptag >>= 8;
                }
 
-               SAFEMEMCPY( (*sos)->sos_first,
+               AC_FMEMCPY( (*sos)->sos_first,
                        &nettag[sizeof(ber_tag_t) - taglen],
                        taglen );
 
@@ -594,12 +594,12 @@ ber_put_seqorset( BerElement *ber )
                }
 
                /* one byte of length length */
-               SAFEMEMCPY( (*sos)->sos_first + 1, &ltag, 1 );
+               (*sos)->sos_first[1] = ltag;
 
                if ( ber->ber_options & LBER_USE_DER ) {
                        if (lenlen > 1) {
                                /* Write the length itself */
-                               SAFEMEMCPY( (*sos)->sos_first + 2,
+                               AC_FMEMCPY( (*sos)->sos_first + 2,
                                    &netlen[sizeof(ber_len_t) - (lenlen - 1)],
                                        lenlen - 1 );
                        }
@@ -609,13 +609,13 @@ ber_put_seqorset( BerElement *ber )
                                 * the length field.  Move the data if
                                 * we don't actually need that much
                                 */
-                               SAFEMEMCPY( (*sos)->sos_first + taglen +
+                               AC_FMEMCPY( (*sos)->sos_first + taglen +
                                    lenlen, (*sos)->sos_first + taglen +
                                    FOUR_BYTE_LEN, len );
                        }
                } else {
                        /* the length itself */
-                       SAFEMEMCPY( (*sos)->sos_first + taglen + 1,
+                       AC_FMEMCPY( (*sos)->sos_first + taglen + 1,
                            &netlen[sizeof(ber_len_t) - (FOUR_BYTE_LEN - 1)],
                                FOUR_BYTE_LEN - 1 );
                }
index 05773e900bf407bcde702dd17262311dbdd57db5..6de4335ca2c99aa1978c7a29bdef7324acdd554e 100644 (file)
@@ -88,7 +88,7 @@ ber_read(
        nleft = ber->ber_end - ber->ber_ptr;
        actuallen = nleft < len ? nleft : len;
 
-       SAFEMEMCPY( buf, ber->ber_ptr, actuallen );
+       AC_MEMCPY( buf, ber->ber_ptr, actuallen );
 
        ber->ber_ptr += actuallen;
 
@@ -112,7 +112,7 @@ ber_write(
                        if ( ber_realloc( ber, len ) != 0 )
                                return( -1 );
                }
-               SAFEMEMCPY( ber->ber_ptr, buf, (size_t)len );
+               AC_MEMCPY( ber->ber_ptr, buf, (size_t)len );
                ber->ber_ptr += len;
                return( (ber_slen_t) len );
 
@@ -121,7 +121,7 @@ ber_write(
                        if ( ber_realloc( ber, len ) != 0 )
                                return( -1 );
                }
-               SAFEMEMCPY( ber->ber_sos->sos_ptr, buf, (size_t)len );
+               AC_MEMCPY( ber->ber_sos->sos_ptr, buf, (size_t)len );
                ber->ber_sos->sos_ptr += len;
                ber->ber_sos->sos_clen += len;
                return( (ber_slen_t) len );
@@ -392,7 +392,7 @@ int ber_flatten(
                        return( -1 );
                }
 
-               SAFEMEMCPY( bv->bv_val, ber->ber_buf, len );
+               AC_MEMCPY( bv->bv_val, ber->ber_buf, len );
                bv->bv_val[len] = '\0';
                bv->bv_len = len;
        }
index a500569cdc59feac0eb18055211849f4c7c5e937..861dd3a23a127990c2806fb6fdf63ebf1e8e49e3 100644 (file)
@@ -473,7 +473,7 @@ ber_bvdup(
                return NULL;
        }
 
-       SAFEMEMCPY( new->bv_val, bv->bv_val, bv->bv_len );
+       AC_MEMCPY( new->bv_val, bv->bv_val, bv->bv_len );
        new->bv_val[bv->bv_len] = '\0';
        new->bv_len = bv->bv_len;
 
@@ -564,6 +564,6 @@ ber_strdup( LDAP_CONST char *s )
                return( NULL );
        }
 
-       SAFEMEMCPY( p, s, len );
+       AC_MEMCPY( p, s, len );
        return( p );
 }
index 0b6ded358fdd881a6e8b5d36e4b77a574bd4b158..3689f0df582c61c87e1a298a8d04ea32aa65f686 100644 (file)
@@ -124,7 +124,7 @@ ber_set_option(
                        return LBER_OPT_ERROR;
                }
 
-               memcpy(ber_int_memory_fns, f, sizeof(BerMemoryFunctions));
+               AC_MEMCPY(ber_int_memory_fns, f, sizeof(BerMemoryFunctions));
 
                ber_int_options.lbo_valid = LBER_INITIALIZED;
                return LBER_OPT_SUCCESS;
index 3899206fc5a269527128edf2986e160baac709fc..06fd8bd937004879697da481ffa85759ad3bbe7e 100644 (file)
@@ -239,7 +239,7 @@ ber_pvt_sb_copy_out( Sockbuf_Buf *sbb, char *buf, ber_len_t len )
        max = sbb->buf_end - sbb->buf_ptr;
        max = ( max < len) ? max : len;
        if ( max ) {
-               memcpy( buf, sbb->buf_base + sbb->buf_ptr, max );
+               AC_MEMCPY( buf, sbb->buf_base + sbb->buf_ptr, max );
                sbb->buf_ptr += max;
                if ( sbb->buf_ptr >= sbb->buf_end )
                        sbb->buf_ptr = sbb->buf_end = 0;
@@ -658,7 +658,7 @@ sb_dgram_ctrl( Sockbuf_IO_Desc *sbiod, int opt, void *arg )
        p = (struct dgram_data *)sbiod->sbiod_pvt;
 
        if ( opt == LBER_SB_OPT_UDP_SET_DST ) {
-               memcpy( &p->dst, arg, sizeof( struct sockaddr ) );
+               AC_MEMCPY( &p->dst, arg, sizeof( struct sockaddr ) );
                return 1;
        }
        else if ( opt == LBER_SB_OPT_UDP_GET_SRC ) {
index 93e0e3108389ce400bafe7efcfb8c457ba4e12a1..82212582c1b02e6ebbc04aff244ca57f350ed93f 100644 (file)
@@ -240,7 +240,7 @@ ldap_add_request_to_cache( LDAP *ld, ber_tag_t msgtype, BerElement *request )
                        ld->ld_errno = LDAP_NO_MEMORY;
                        return;
                }
-               SAFEMEMCPY( new->lm_ber->ber_buf, request->ber_buf,
+               AC_MEMCPY( new->lm_ber->ber_buf, request->ber_buf,
                    (size_t)len );
                new->lm_ber->ber_ptr = new->lm_ber->ber_buf;
                new->lm_ber->ber_end = new->lm_ber->ber_buf + len;
@@ -498,7 +498,7 @@ msg_dup( LDAPMessage *msg )
                        LDAP_FREE( (char *)new );
                        return( NULL );
                }
-               SAFEMEMCPY( new->lm_ber->ber_buf, msg->lm_ber->ber_buf,
+               AC_MEMCPY( new->lm_ber->ber_buf, msg->lm_ber->ber_buf,
                    (size_t)len );
                new->lm_ber->ber_ptr = new->lm_ber->ber_buf +
                        ( msg->lm_ber->ber_ptr - msg->lm_ber->ber_buf );
index 50839df1fa848831157e0b505c201c0eefe4db57..1ec30c88e468866bdb01415d3da6583773b2436e 100644 (file)
@@ -139,7 +139,7 @@ cldap_open( LDAP_CONST char *host, int port )
                }
 
                for ( i = 0; hp->h_addr_list[ i ] != 0; ++i ) {
-                   SAFEMEMCPY( (char *)&sock.sin_addr,
+                   AC_MEMCPY( (char *)&sock.sin_addr,
                            (char *)hp->h_addr_list[ i ],
                            sizeof(sock.sin_addr));
                    if ( add_addr( ld, (struct sockaddr *)&sock ) < 0 ) {
@@ -287,7 +287,7 @@ add_addr( LDAP *ld, struct sockaddr *sap )
        return( -1 );
     }
 
-    SAFEMEMCPY( (char *)newsap, (char *)sap, sizeof( struct sockaddr ));
+    AC_MEMCPY( (char *)newsap, (char *)sap, sizeof( struct sockaddr ));
     addrs[ ld->ld_cldapnaddr++ ] = newsap;
     ld->ld_cldapaddrs = (void **)addrs;
     return( 0 );
index 5c69588e422e6bd6704de515610aa634643c5049..6a814b80fe053a3082e29928689ef832f8a55f79 100644 (file)
@@ -348,7 +348,7 @@ ldap_control_dup( const LDAPControl *c )
                        return NULL;
                }
                
-               SAFEMEMCPY( new->ldctl_value.bv_val, c->ldctl_value.bv_val, 
+               AC_MEMCPY( new->ldctl_value.bv_val, c->ldctl_value.bv_val, 
                        c->ldctl_value.bv_len );
 
                new->ldctl_value.bv_len = c->ldctl_value.bv_len;
index 57d80a541cf11410dfb73cedacb91f6b66a8a2e4..2b7771c5bdf1b74dbcbf3d1d4fcbb2ff5c91cdbd 100644 (file)
@@ -135,7 +135,7 @@ next_line( char **bufp, ber_len_t *blenp, char **linep )
        return( -1 );   /* fatal error */
     }
 
-    (void) memcpy( line, linestart, p - linestart );
+    AC_MEMCPY( line, linestart, p - linestart );
     line[ p - linestart - 1 ] = '\0';
     *linep = line;
     return( strlen( line ));
index 0d8b488e19ac18c35e24fba7a0161fb22cd04322..3ed841ab5eb22261622e7bc92fb2a908ab531923 100644 (file)
@@ -334,7 +334,7 @@ explode_name( const char *name, int notypes, int is_type )
                                if (( parts[ count-1 ] = (char *)LDAP_CALLOC( 1,
                                    len + 1 )) != NULL )
                                {
-                                       SAFEMEMCPY( parts[ count-1 ], rdn, len );
+                                       AC_MEMCPY( parts[ count-1 ], rdn, len );
 
                                        if( !endquote ) {
                                                /* skip trailing spaces */
index ccdca5ea402e074b3feec2515a125a9ae4beb243..66d40656ade8d090db1c522abe2dd4f92e546267 100644 (file)
@@ -104,7 +104,7 @@ ldap_get_entry_controls(
        }
 
        /* make a local copy of the BerElement */
-       SAFEMEMCPY(&be, entry->lm_ber, sizeof(be));
+       AC_MEMCPY(&be, entry->lm_ber, sizeof(be));
 
        if ( ber_scanf( &be, "{xx" /*}*/ ) == LBER_ERROR ) {
                rc = LDAP_DECODING_ERROR;
index c837631e6d65f3acd36ea3b4dfca7f73a62cc223..9939ae88acd1dad6017747ad281a1200d344b2ed 100644 (file)
@@ -370,7 +370,7 @@ ldap_build_filter(
                                    *f++ = ' ';
                                }
                                slen = strlen( valwords[ i ] );
-                               SAFEMEMCPY( f, valwords[ i ], slen );
+                               AC_MEMCPY( f, valwords[ i ], slen );
                                f += slen;
                            }
                        }
@@ -379,17 +379,17 @@ ldap_build_filter(
                        if ( wordcount > 0 ) {
                            wordnum = wordcount - 1;
                            slen = strlen( valwords[ wordnum ] );
-                           SAFEMEMCPY( f, valwords[ wordnum ], slen );
+                           AC_MEMCPY( f, valwords[ wordnum ], slen );
                            f += slen;
                        }
                    } else if ( value != NULL ) {
                        slen = strlen( value );
-                       SAFEMEMCPY( f, value, slen );
+                       AC_MEMCPY( f, value, slen );
                        f += slen;
                    }
                } else if ( *p == 'a' && attr != NULL ) {
                    slen = strlen( attr );
-                   SAFEMEMCPY( f, attr, slen );
+                   AC_MEMCPY( f, attr, slen );
                    f += slen;
                } else {
                    *f++ = *p;
index 65fb0d2e036be7792863bb0d667495df5ad69968..240c3f7b242a84fa44fec3205f28900e829ed611 100644 (file)
@@ -275,7 +275,7 @@ ldap_get_kerberosv4_credentials(
        }
 
        *len = ktxt.length;
-       memcpy( cred, ktxt.dat, ktxt.length );
+       AC_MEMCPY( cred, ktxt.dat, ktxt.length );
 
        return( cred );
 }
index 4ee3c1b269d56c0f06f89c55153338b4ddec22c4..4b2176a2a4e34d16307eb727bc945d136c3debd1 100644 (file)
@@ -135,7 +135,7 @@ ldap_create( LDAP **ldp )
        }
    
        /* copy the global options */
-       memcpy(&ld->ld_options, gopts, sizeof(ld->ld_options));
+       AC_MEMCPY(&ld->ld_options, gopts, sizeof(ld->ld_options));
 
        ld->ld_valid = LDAP_VALID_SESSION;
 
index 805e0223f5c3c50a884371c329eff77c23d1c815..c2143561a10a7e2841b931901ecd5dddccb9a50e 100644 (file)
@@ -74,7 +74,7 @@ ldap_int_timeval_dup( struct timeval **dest, const struct timeval *src )
                return 1;
        }
 
-       SAFEMEMCPY( (char *) new, (const char *) src, sizeof(struct timeval));
+       AC_MEMCPY( (char *) new, (const char *) src, sizeof(struct timeval));
 
        *dest = new;
        return 0;
@@ -394,7 +394,7 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
                sin.sin_port = port;
                p = (char *)&sin.sin_addr;
                q = use_hp ? (char *)hp->h_addr_list[i] : (char *)&address;
-               SAFEMEMCPY(p, q, sizeof(sin.sin_addr) );
+               AC_MEMCPY(p, q, sizeof(sin.sin_addr) );
 
                osip_debug(ld, "ldap_connect_to_host: Trying %s:%d\n", 
                                inet_ntoa(sin.sin_addr),ntohs(sin.sin_port),0);
index 9336aa94174d7620fade24ab14e60fb0f07dbcfc..6a6d723356bdd161edc524303f995e1af03e9e7f 100644 (file)
@@ -105,7 +105,7 @@ ldap_parse_reference(
        }
 
        /* make a private copy of BerElement */
-       SAFEMEMCPY(&be, ref->lm_ber, sizeof(be));
+       AC_MEMCPY(&be, ref->lm_ber, sizeof(be));
        
        if ( ber_scanf( &be, "{v" /*}*/, &refs ) == LBER_ERROR ) {
                rc = LDAP_DECODING_ERROR;
index 385312256f94e7663d9f9e235b8e9702573ea383..10a45aac58b179dbff22b1aafb35025c7f4f1422 100644 (file)
@@ -938,7 +938,7 @@ time2text( char *ldtimestr, int dateonly )
    
     timestr[ strlen( timestr ) - 1 ] = zone;   /* replace trailing newline */
     if ( dateonly ) {
-       SAFEMEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
+               AC_MEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
     }
 
     return( timestr );
index db21748c8db8d0fe6d3441902b648d8f1a32d52f..ec79348fec07bafe4a57ec13f923f5deb2e0862d 100644 (file)
@@ -98,7 +98,7 @@ ldap_ufn_search_ctx( LDAP *ld, char **ufncomp, int ncomp, char *prefix,
 
                        if ( (quote = strrchr( ufncomp[ncomp], '"' )) != NULL )
                                *quote = '\0';
-                       SAFEMEMCPY( ufncomp[ncomp], ufncomp[ncomp] + 1,
+                       AC_MEMCPY( ufncomp[ncomp], ufncomp[ncomp] + 1,
                                    strlen( ufncomp[ncomp] + 1 ) + 1 );
                }
                if ( ncomp == 0 )
index b0484034a5f6bfc26d6c351e08facf0ea03ad97b..126b573cb20f322d764a5be4c3d10b76c99afaa5 100644 (file)
@@ -83,7 +83,7 @@ char *ldap_pvt_ctime( const time_t *tp, char *buf )
 # ifdef LDAP_R_COMPILE
        ldap_pvt_thread_mutex_lock( &ldap_int_ctime_mutex );
 # endif
-       memcpy( buf, ctime(tp), 26 );
+       AC_MEMCPY( buf, ctime(tp), 26 );
 # ifdef LDAP_R_COMPILE
        ldap_pvt_thread_mutex_unlock( &ldap_int_ctime_mutex );
 # endif
@@ -288,7 +288,7 @@ static char *cpy_aliases( char ***tgtio, char *buf, char **src )
        char **tgt=*tgtio;
        for( ; (*src) ; src++ ) {
                len = strlen( *src ) + 1;
-               memcpy( buf, *src, len );
+               AC_MEMCPY( buf, *src, len );
                *tgt++=buf;
                buf+=len;
        }
@@ -300,7 +300,7 @@ static char *cpy_addresses( char ***tgtio, char *buf, char **src, int len )
 {
        char **tgt=*tgtio;
        for( ; (*src) ; src++ ) {
-               memcpy( buf, *src, len );
+               AC_MEMCPY( buf, *src, len );
                *tgt++=buf;
                buf+=len;
        }
@@ -343,9 +343,9 @@ static int copy_hostent( struct hostent *res, char **buf, struct hostent * src )
        if (safe_realloc( buf, total_len )) {                    
                tp = (char **) *buf;
                tbuf = *buf + (n_alias + n_addr + 2) * sizeof( char * );
-               memcpy( res, src, sizeof( struct hostent ) );
+               AC_MEMCPY( res, src, sizeof( struct hostent ) );
                /* first the name... */
-               memcpy( tbuf, src->h_name, name_len );
+               AC_MEMCPY( tbuf, src->h_name, name_len );
                res->h_name = tbuf; tbuf+=name_len;
                /* now the aliases */
                res->h_aliases = tp;
index 3e6825ac0a065263ce4ddf20a145c0a64f3420d9..8b857f630db3297a8768d083504f72661c983bf6 100644 (file)
@@ -51,7 +51,7 @@ ldbm_datum_dup( LDBM ldbm, Datum data )
        }
        dup.dsize = data.dsize;
        if ( (dup.dptr = (char *) malloc( data.dsize )) != NULL )
-               memcpy( dup.dptr, data.dptr, data.dsize );
+               AC_MEMCPY( dup.dptr, data.dptr, data.dsize );
 
        return( dup );
 }
@@ -811,7 +811,7 @@ ldbm_fetch( LDBM ldbm, Datum key )
        k.key.dsize = key.dsize + 1;                    
        k.key.dptr = malloc(k.key.dsize);
        *(k.key.dptr) = 'l';
-       memcpy( (void *)(k.key.dptr + 1), key.dptr, key.dsize );        
+       AC_MEMCPY( (void *)(k.key.dptr + 1), key.dptr, key.dsize );     
 #else
        k.key = key;
 #endif 
@@ -879,7 +879,7 @@ ldbm_store( LDBM ldbm, Datum key, Datum data, int flags )
        int_key.dsize = key.dsize + 1;
        int_key.dptr = malloc( int_key.dsize );
        *(int_key.dptr) = 'l';  /* Must not be NULL !*/
-       memcpy( (void *)(int_key.dptr + 1), key.dptr, key.dsize );
+       AC_MEMCPY( (void *)(int_key.dptr + 1), key.dptr, key.dsize );
 #else
        int_key = key;
 #endif
@@ -918,7 +918,7 @@ ldbm_delete( LDBM ldbm, Datum key )
        int_key.dsize = key.dsize + 1;
        int_key.dptr = malloc(int_key.dsize);
        *(int_key.dptr) = 'l';
-       memcpy( (void *)(int_key.dptr + 1), key.dptr, key.dsize );      
+       AC_MEMCPY( (void *)(int_key.dptr + 1), key.dptr, key.dsize );   
 #else
        int_key = key;
 #endif
@@ -974,7 +974,7 @@ ldbm_get_next( LDBM ldbm, kvpair (*fptr)(MDBM *, kvpair) )
 
            } else {
 
-               memcpy(ret.dptr, (void *)(out.key.dptr + delta),
+               AC_MEMCPY(ret.dptr, (void *)(out.key.dptr + delta),
                       ret.dsize );
 
            }
index daf90345987018786b4a82b52ecdddd44bf7c5fd..1f62be80e0a971a8591a9a13d714e7fcae492304 100644 (file)
@@ -80,7 +80,7 @@ ldif_fetch_url(
                        return -1;
                }
                p = newp;
-               SAFEMEMCPY( &p[total], buffer, bytes );
+               AC_MEMCPY( &p[total], buffer, bytes );
                total += bytes;
        }
 
index e4a85a226d0f7d67e075c3dd3f46d24bcecd5d81..e101cd9e3ecfa4ae01911c30e355c7fc7137b8d0 100644 (file)
@@ -231,7 +231,7 @@ done:
                        ber_memfree( freeme );
                        return( -1 );
                }
-               memcpy( p, value, vlen );
+               AC_MEMCPY( p, value, vlen );
                p[vlen] = '\0';
                value = p;
        }
index 836a2ef69fa7b62811b47723adacdc57c631370c..0aa9d9354d6e5c05e3422c98526ea54d57a0dda9 100644 (file)
@@ -446,7 +446,7 @@ add_decomp(unsigned long code)
          * Shift the decomps up by one if the codes don't match.
          */
         for (j = decomps_used; j > i; j--)
-          (void) memcpy((char *) &decomps[j], (char *) &decomps[j - 1],
+          (void) AC_MEMCPY((char *) &decomps[j], (char *) &decomps[j - 1],
                         sizeof(_decomp_t));
     }
 
@@ -470,7 +470,7 @@ add_decomp(unsigned long code)
 
     decomps[i].code = code;
     decomps[i].used = dectmp_size;
-    (void) memcpy((char *) decomps[i].decomp, (char *) dectmp,
+    (void) AC_MEMCPY((char *) decomps[i].decomp, (char *) dectmp,
                   sizeof(unsigned long) * dectmp_size);
 
 }
@@ -504,7 +504,7 @@ add_title(unsigned long code)
          * Shift the array up by one.
          */
         for (j = title_used; j > i; j--)
-          (void) memcpy((char *) &title[j], (char *) &title[j - 1],
+          (void) AC_MEMCPY((char *) &title[j], (char *) &title[j - 1],
                         sizeof(_case_t));
     }
 
@@ -551,7 +551,7 @@ add_upper(unsigned long code)
          * Shift the array up by one.
          */
         for (j = upper_used; j > i; j--)
-          (void) memcpy((char *) &upper[j], (char *) &upper[j - 1],
+          (void) AC_MEMCPY((char *) &upper[j], (char *) &upper[j - 1],
                         sizeof(_case_t));
     }
 
@@ -598,7 +598,7 @@ add_lower(unsigned long code)
          * Shift the array up by one.
          */
         for (j = lower_used; j > i; j--)
-          (void) memcpy((char *) &lower[j], (char *) &lower[j - 1],
+          (void) AC_MEMCPY((char *) &lower[j], (char *) &lower[j - 1],
                         sizeof(_case_t));
     }
 
index 51821f97f11fa41163a54027d3ac392ee7c5f954..e36e9c0a9dfc5f5f3f67d9bc985242ed3cb6d11b 100644 (file)
@@ -1113,7 +1113,7 @@ _ure_make_symbol(ucs2_t *sym, unsigned long limit, unsigned long *consumed,
     }
 
     symbol.id = b->symtab_used++;
-    (void) memcpy((char *) &b->symtab[symbol.id], (char *) &symbol,
+    (void) AC_MEMCPY((char *) &b->symtab[symbol.id], (char *) &symbol,
                   sizeof(_ure_symtab_t));
 
     return symbol.id;
@@ -1347,7 +1347,7 @@ _ure_add_state(ucs2_t nstates, ucs2_t *states, _ure_buffer_t *b)
             sp->st.slist_size = sp->st.slist_used + nstates;
         }
         sp->st.slist_used = nstates;
-        (void) memcpy((char *) sp->st.slist, (char *) states,
+        (void) AC_MEMCPY((char *) sp->st.slist, (char *) states,
                       sizeof(ucs2_t) * nstates);
     }
 
index 1759f7dee14210d7aa2fe36f71802569b9b0ffd5..13e9d9dd25c64f0ab9f829fae3a5458c2d56be84 100644 (file)
@@ -140,7 +140,7 @@ int lutil_entropy( char *buf, ber_len_t nbytes )
 
                        lutil_MD5Final( digest, &ctx );
 
-                       memcpy( &buf[n], digest,
+                       AC_MEMCPY( &buf[n], digest,
                                nbytes - n >= 16 ? 16 : nbytes - n );
                }
 
index 9ce509f8ffe13ab86436b802423dbd58d2bb4500..9e14cc2a4ae807d06b668fad3ee62105bd09a497 100644 (file)
@@ -110,10 +110,10 @@ lutil_MD5Update(
 
                t = 64-t;
                if (len < t) {
-                       memcpy(p, buf, len);
+                       AC_MEMCPY(p, buf, len);
                        return;
                }
-               memcpy(p, buf, t);
+               AC_MEMCPY(p, buf, t);
                lutil_MD5Transform(ctx->buf, ctx->in);
                buf += t;
                len -= t;
@@ -122,7 +122,7 @@ lutil_MD5Update(
        /* Process data in 64-byte chunks */
 
        while (len >= 64) {
-               memcpy(ctx->in, buf, 64);
+               AC_MEMCPY(ctx->in, buf, 64);
                lutil_MD5Transform(ctx->buf, ctx->in);
                buf += 64;
                len -= 64;
@@ -130,7 +130,7 @@ lutil_MD5Update(
 
        /* Handle any remaining bytes of data. */
 
-       memcpy(ctx->in, buf, len);
+       AC_MEMCPY(ctx->in, buf, len);
 }
 
 /*
index f6f791066b45fc26da0a345aab0b6496fc1733b7..68c2709ab6053a4d96843e1bb5005a70982e6938 100644 (file)
@@ -351,8 +351,8 @@ static struct berval * pw_string(
                return NULL;
        }
 
-       memcpy( pw->bv_val, sc->name.bv_val, sc->name.bv_len );
-       memcpy( &pw->bv_val[sc->name.bv_len], passwd->bv_val, passwd->bv_len );
+       AC_MEMCPY( pw->bv_val, sc->name.bv_val, sc->name.bv_len );
+       AC_MEMCPY( &pw->bv_val[sc->name.bv_len], passwd->bv_val, passwd->bv_len );
 
        pw->bv_val[pw->bv_len] = '\0';
        return pw;
@@ -380,9 +380,9 @@ static struct berval * pw_string64(
                        return NULL;
                }
 
-               memcpy( string.bv_val, hash->bv_val,
+               AC_MEMCPY( string.bv_val, hash->bv_val,
                        hash->bv_len );
-               memcpy( &string.bv_val[hash->bv_len], salt->bv_val,
+               AC_MEMCPY( &string.bv_val[hash->bv_len], salt->bv_val,
                        salt->bv_len );
                string.bv_val[string.bv_len] = '\0';
 
@@ -400,7 +400,7 @@ static struct berval * pw_string64(
                return NULL;
        }
 
-       memcpy(b64->bv_val, sc->name.bv_val, sc->name.bv_len);
+       AC_MEMCPY(b64->bv_val, sc->name.bv_val, sc->name.bv_len);
 
        rc = lutil_b64_ntop(
                string.bv_val, string.bv_len,
index b3e608b606f3b5b8d1db91c3c1b03c864b6fd7db..9d97ceb169c165118afe8b363458c9095079cb1f 100644 (file)
@@ -71,7 +71,7 @@ lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
 
 #ifdef SHA1HANDSOFF
     uint32 block[16];
-    (void)memcpy(block, buffer, 64);
+    (void)AC_MEMCPY(block, buffer, 64);
 #else
     uint32 *block = (u_int32 *) buffer;
 #endif
@@ -151,7 +151,7 @@ lutil_SHA1Update(
        context->count[1] += (len>>29)+1;
     j = (j >> 3) & 63;
     if ((j + len) > 63) {
-       (void)memcpy(&context->buffer[j], data, (i = 64-j));
+       (void)AC_MEMCPY(&context->buffer[j], data, (i = 64-j));
        lutil_SHA1Transform(context->state, context->buffer);
        for ( ; i + 63 < len; i += 64)
            lutil_SHA1Transform(context->state, &data[i]);
@@ -159,7 +159,7 @@ lutil_SHA1Update(
     } else {
        i = 0;
     }
-    (void)memcpy(&context->buffer[j], &data[i], len - i);
+    (void)AC_MEMCPY(&context->buffer[j], &data[i], len - i);
 }
 
 
index 205e72106beb83b810853bf19e9cc231e53fc572..2e74071b3160c7360a5be014bcaa2ef1e46c693f 100644 (file)
@@ -879,7 +879,7 @@ aci_bvstrdup( struct berval *bv )
 
        s = (char *)ch_malloc(bv->bv_len + 1);
        if (s != NULL) {
-               memcpy(s, bv->bv_val, bv->bv_len);
+               AC_MEMCPY(s, bv->bv_val, bv->bv_len);
                s[bv->bv_len] = 0;
        }
        return(s);
index e45ded2ae6a9dd06483bc095b39a54bf3c952399..d159ea8631279996900a567441c3727be96f8b21 100644 (file)
@@ -301,7 +301,7 @@ static int slap_mods2entry(
                                sizeof( struct berval * ) * (i+j) );
 
                        /* should check for duplicates */
-                       memcpy( &attr->a_vals[i], mods->sml_bvalues,
+                       AC_MEMCPY( &attr->a_vals[i], mods->sml_bvalues,
                                sizeof( struct berval * ) * j );
 
                        /* trim the mods array */
index 811dd59803bbaa5fbcdea3c92244d561b7cb0b5b..25c1d7589bfa895a3d5709bd0d10c8ecb71c7eed 100644 (file)
@@ -247,7 +247,7 @@ at_add(
                return SLAP_SCHERR_ATTR_INCOMPLETE;
        }
        sat = (AttributeType *) ch_calloc( 1, sizeof(AttributeType) );
-       memcpy( &sat->sat_atype, at, sizeof(LDAPAttributeType));
+       AC_MEMCPY( &sat->sat_atype, at, sizeof(LDAPAttributeType));
 
        sat->sat_cname = cname;
 
index 5f44fb48416129d67f43e60c4dfb64d3b135bd5c..d37dfeb3abe1adbf33013459b7d69edc02632a01 100644 (file)
@@ -279,8 +279,8 @@ char* new_superior(
 
        newDN = ch_malloc( dnlen - olen + nlen + 1 );
 
-       memcpy( newDN, dn, dnlen - olen );
-       memcpy( &newDN[dnlen - olen], newSup, nlen );
+       AC_MEMCPY( newDN, dn, dnlen - olen );
+       AC_MEMCPY( &newDN[dnlen - olen], newSup, nlen );
        newDN[dnlen - olen + nlen] = '\0';
 
        return newDN;
index ca614d978acdc0cbfab0aca68f2f992f5b7a8a55..81f1154a855a2f0e4d29843313e8663c5e23ea0f 100644 (file)
@@ -139,7 +139,7 @@ dn2id(
                return( NOID );
        }
 
-       (void) memcpy( (char *) &id, data.dptr, sizeof(ID) );
+       AC_MEMCPY( (char *) &id, data.dptr, sizeof(ID) );
 
        assert( id != NOID );
 
index 1cdaa750d4df901458695bcdd7413f361c785292..13ac4235b05752fa8a49c4bdfcf4dd0a33cd4305 100644 (file)
@@ -25,7 +25,7 @@ static void cont_alloc( Datum *cont, Datum *key )
 
        * (unsigned char *) cont->dptr = SLAP_INDEX_CONT_PREFIX;
 
-       memcpy( &((unsigned char *)cont->dptr)[1 + sizeof(ID)],
+       AC_MEMCPY( &((unsigned char *)cont->dptr)[1 + sizeof(ID)],
                key->dptr, key->dsize );
 }
 
@@ -196,7 +196,7 @@ idl_fetch(
                        continue;
                }
 
-               SAFEMEMCPY(
+               AC_MEMCPY(
                        (char *) &ID_BLOCK_ID(idl, nids),
                        (char *) &ID_BLOCK_ID(tmp[i], 0),
                        ID_BLOCK_NIDS(tmp[i]) * sizeof(ID) );
@@ -275,7 +275,7 @@ idl_split_block(
                ID_BLOCK_NIDS(*right) = 1;
                ID_BLOCK_ID(*right, 0) = id;
        } else {
-               SAFEMEMCPY(
+               AC_MEMCPY(
                        (char *) &ID_BLOCK_ID(*right, 0),
                        (char *) &ID_BLOCK_ID(b, 0),
                        nr * sizeof(ID) );
@@ -284,7 +284,7 @@ idl_split_block(
        }
 
        /* the id being inserted & everything after in the second block */
-       SAFEMEMCPY(
+       AC_MEMCPY(
                (char *) &ID_BLOCK_ID(*left, (nr == 0 ? 0 : 1)),
            (char *) &ID_BLOCK_ID(b, nr),
                nl * sizeof(ID) );
@@ -517,7 +517,7 @@ idl_insert_key(
 
                                k3.dptr = ch_malloc(k2.dsize);
                                k3.dsize = k2.dsize;
-                               memcpy(k3.dptr, k2.dptr, k3.dsize);
+                               AC_MEMCPY(k3.dptr, k2.dptr, k3.dsize);
                            if ( (rc = idl_store( be, db, k3, tmp )) != 0 ) {
                                Debug( LDAP_DEBUG_ANY,
                            "idl_insert_key: idl_store returned %d\n", rc, 0, 0 );
@@ -612,7 +612,7 @@ split:
                tmp = idl_alloc( ID_BLOCK_NMAX(idl) + 1 );
                ID_BLOCK_NIDS(tmp) = ID_BLOCK_INDIRECT_VALUE;
                /* everything up to the split block */
-               SAFEMEMCPY(
+               AC_MEMCPY(
                        (char *) &ID_BLOCK_ID(tmp, 0),
                        (char *) &ID_BLOCK_ID(idl, 0),
                    i * sizeof(ID) );
@@ -620,7 +620,7 @@ split:
                ID_BLOCK_ID(tmp, i) = ID_BLOCK_ID(tmp2, 0);
                ID_BLOCK_ID(tmp, i + 1) = ID_BLOCK_ID(tmp3, 0);
                /* everything after the split block */
-               SAFEMEMCPY(
+               AC_MEMCPY(
                        (char *) &ID_BLOCK_ID(tmp, i + 2),
                        (char *) &ID_BLOCK_ID(idl, i + 1),
                        (ID_BLOCK_NMAX(idl) - i - 1) * sizeof(ID) );
@@ -690,7 +690,7 @@ idl_insert( ID_BLOCK **idl, ID id, unsigned int maxids )
        }
 
        /* make a slot for the new id */
-       SAFEMEMCPY( &ID_BLOCK_ID(*idl, i+1), &ID_BLOCK_ID(*idl, i),
+       AC_MEMCPY( &ID_BLOCK_ID(*idl, i+1), &ID_BLOCK_ID(*idl, i),
                    (ID_BLOCK_NIDS(*idl) - i) * sizeof(ID) );
 
        ID_BLOCK_ID(*idl, i) = id;
@@ -735,7 +735,7 @@ idl_delete_key (
                                        ldbm_cache_delete( db, key );
 
                                } else {
-                                       SAFEMEMCPY (
+                                       AC_MEMCPY(
                                                &ID_BLOCK_ID(idl, i),
                                                &ID_BLOCK_ID(idl, i+1),
                                                (ID_BLOCK_NIDS(idl)-i) * sizeof(ID) );
@@ -779,7 +779,7 @@ idl_delete_key (
                {
                        if ( ID_BLOCK_ID(tmp, i) == id )
                        {
-                               SAFEMEMCPY(
+                               AC_MEMCPY(
                                        &ID_BLOCK_ID(tmp, i),
                                        &ID_BLOCK_ID(tmp, i+1),
                                        (ID_BLOCK_NIDS(tmp)-(i+1)) * sizeof(ID));
@@ -791,7 +791,7 @@ idl_delete_key (
 
                                } else {
                                        ldbm_cache_delete( db, data );
-                                       SAFEMEMCPY(
+                                       AC_MEMCPY(
                                                &ID_BLOCK_ID(idl, j),
                                                &ID_BLOCK_ID(idl, j+1),
                                                (nids-(j+1)) * sizeof(ID));
@@ -829,7 +829,7 @@ idl_dup( ID_BLOCK *idl )
 
        new = idl_alloc( ID_BLOCK_NMAX(idl) );
 
-       SAFEMEMCPY(
+       AC_MEMCPY(
                (char *) new,
                (char *) idl,
                (ID_BLOCK_NMAX(idl) + ID_BLOCK_IDS_OFFSET) * sizeof(ID) );
index 37cbfc5f05f074324f039ed6e7a56dfae94e6b2f..c92cbaab780948148f1e5826a435af8067c995b0 100644 (file)
@@ -40,7 +40,7 @@ next_id_read( Backend *be )
        data = ldbm_cache_fetch( db, key );
 
        if( data.dptr != NULL ) {
-               memcpy( &id, data.dptr, sizeof( ID ) );
+               AC_MEMCPY( &id, data.dptr, sizeof( ID ) );
                ldbm_datum_free( db->dbc_db, data );
 
        } else {
index 2cf78c9cb44716a467677e56374a93d448d23181..68d2a289698eb4987336029b36794ee41185dfe4 100644 (file)
@@ -84,7 +84,7 @@ ID ldbm_tool_entry_first(
                return NOID;
        }
 
-       memcpy( &id, key.dptr, key.dsize );
+       AC_MEMCPY( &id, key.dptr, key.dsize );
 
        ldbm_datum_free( id2entry->dbc_db, key );
 
@@ -109,7 +109,7 @@ ID ldbm_tool_entry_next(
                return NOID;
        }
 
-       memcpy( &id, key.dptr, key.dsize );
+       AC_MEMCPY( &id, key.dptr, key.dsize );
 
        ldbm_datum_free( id2entry->dbc_db, key );
 
index 780e3b9cc3ac04517d5d815952a132593c84ed11..a5963c654447fbed4fcec8e2dcfcf5899d639f7c 100644 (file)
@@ -159,13 +159,13 @@ int backend_add(BackendInfo *aBackendInfo)
       /* if backendInfo == binfo no deallocation of old backendInfo */
       if (backendInfo == binfo) {
         newBackendInfo = ch_calloc(nBackendInfo + 1, sizeof(BackendInfo));
-        memcpy(newBackendInfo, backendInfo, sizeof(BackendInfo) * 
+        AC_MEMCPY(newBackendInfo, backendInfo, sizeof(BackendInfo) * 
                nBackendInfo);
       } else {
         newBackendInfo = ch_realloc(backendInfo, sizeof(BackendInfo) * 
                                     (nBackendInfo + 1));
       }
-      memcpy(&newBackendInfo[nBackendInfo], aBackendInfo, 
+      AC_MEMCPY(&newBackendInfo[nBackendInfo], aBackendInfo, 
             sizeof(BackendInfo));
       backendInfo = newBackendInfo;
       nBackendInfo++;
index 6c12ae0aacbdd75bdfaf37b1fdb0ded5e1675ea7..01ee0a1cd7286ba978d251af70a07c528ce20648 100644 (file)
@@ -882,12 +882,12 @@ strtok_quote( char *line, char *sep )
                        } else {
                                inquote = 1;
                        }
-                       SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
+                       AC_MEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
                        break;
 
                case '\\':
                        if ( next[1] )
-                               SAFEMEMCPY( next,
+                               AC_MEMCPY( next,
                                            next + 1, strlen( next + 1 ) + 1 );
                        next++;         /* dont parse the escaped character */
                        break;
index 74c7063dec0a0c2a53e8dbdd08364c1a1ae81b03..59c4143b77bbabb7bfccff5bc8ac2909d6c8bb75 100644 (file)
@@ -348,7 +348,7 @@ static Listener * open_listener( const char* url )
                                return NULL;
                        }
 
-                       memcpy( &l.sl_addr.sin_addr, he->h_addr,
+                       AC_MEMCPY( &l.sl_addr.sin_addr, he->h_addr,
                               sizeof( l.sl_addr.sin_addr ) );
                }
        }
@@ -731,8 +731,8 @@ slapd_daemon_task(
                        }
                }
 #else
-               memcpy( &readfds, &slap_daemon.sd_readers, sizeof(fd_set) );
-               memcpy( &writefds, &slap_daemon.sd_writers, sizeof(fd_set) );
+               AC_MEMCPY( &readfds, &slap_daemon.sd_readers, sizeof(fd_set) );
+               AC_MEMCPY( &writefds, &slap_daemon.sd_writers, sizeof(fd_set) );
 #endif
                assert(!FD_ISSET(wake_sds[0], &readfds));
                FD_SET( wake_sds[0], &readfds );
index 66825e5a64cc0df076d56b282bd6582ed41c107e..344247cf562d893c97c836f9b7b4546eef300343 100644 (file)
@@ -32,7 +32,7 @@ krbv4_ldap_auth(
 
        Debug( LDAP_DEBUG_TRACE, "=> kerberosv4_ldap_auth\n", 0, 0, 0 );
 
-       SAFEMEMCPY( ktxt->dat, cred->bv_val, cred->bv_len );
+       AC_MEMCPY( ktxt->dat, cred->bv_val, cred->bv_len );
        ktxt->length = cred->bv_len;
 
        strcpy( instance, "*" );
index 983a85d0386bdb65470464deb63b6c35ed64fafa..1f1257da97b3fc18cd6b001f8e90ac3e4036da90 100644 (file)
@@ -125,7 +125,7 @@ mr_add(
        int             code;
 
        smr = (MatchingRule *) ch_calloc( 1, sizeof(MatchingRule) );
-       memcpy( &smr->smr_mrule, mr, sizeof(LDAPMatchingRule));
+       AC_MEMCPY( &smr->smr_mrule, mr, sizeof(LDAPMatchingRule));
 
        smr->smr_usage = usage;
        smr->smr_convert = convert;
index c531021400ac5ce56a8412887edd6e6160f12e09..8ffd3d43c0b00e68eada4e46fafc9e967c44420b 100644 (file)
@@ -338,7 +338,7 @@ oc_add(
        int             code;
 
        soc = (ObjectClass *) ch_calloc( 1, sizeof(ObjectClass) );
-       memcpy( &soc->soc_oclass, oc, sizeof(LDAPObjectClass) );
+       AC_MEMCPY( &soc->soc_oclass, oc, sizeof(LDAPObjectClass) );
 
        if( soc->soc_sup_oids == NULL &&
                soc->soc_kind == LDAP_SCHEMA_STRUCTURAL )
index c1616099dbb6738596d06595d822dbd84a1e2431..d6c3bd4b52cee69619b284e5d7f52f0d0e34add9 100644 (file)
@@ -49,7 +49,7 @@ static char *v2ref( struct berval **ref, const char *text )
        for( i=0; ref[i] != NULL; i++ ) {
                v2 = ch_realloc( v2, len + ref[i]->bv_len + 1 );
                v2[len-1] = '\n';
-               memcpy(&v2[len], ref[i]->bv_val, ref[i]->bv_len );
+               AC_MEMCPY(&v2[len], ref[i]->bv_val, ref[i]->bv_len );
                len += ref[i]->bv_len;
                if (ref[i]->bv_val[ref[i]->bv_len-1] != '/')
                        ++len;
index 468b31672037bfb18a4706b0565b05eade7be3fb..51db9b7247db6d8b3296195b32e3f8ddbbb802b1 100644 (file)
@@ -1666,7 +1666,7 @@ objectIdentifierFirstComponentMatch(
 
        } else {
                char *stored = ch_malloc( oid.bv_len + 1 );
-               memcpy( stored, oid.bv_val, oid.bv_len );
+               AC_MEMCPY( stored, oid.bv_val, oid.bv_len );
                stored[oid.bv_len] = '\0';
 
                if ( !strcmp( syntax->ssyn_oid, SLAP_SYNTAX_MATCHINGRULES_OID ) ) {
index be0a60263e81c8b7507e3f1d9a7d2338d22ff01f..d5c021f4dc25678c1d7df5c451729d67ba4c53d1 100644 (file)
@@ -135,7 +135,7 @@ set_chase (SET_GATHER gatherer, void *cookie, char **set, char *attr, int attrle
                set_dispose(set);
                return(NULL);
        }
-       memcpy(attrstr, attr, attrlen);
+       AC_MEMCPY(attrstr, attr, attrlen);
        attrstr[attrlen] = 0;
 
        nset = ch_calloc(1, sizeof(char *));
@@ -287,7 +287,7 @@ set_filter (SET_GATHER gatherer, void *cookie, char *filter, char *user, char *t
                        *set = ch_calloc(len + 1, sizeof(char));
                        if (*set == NULL)
                                SF_ERROR(memory);
-                       memcpy(*set, &filter[-len - 1], len);
+                       AC_MEMCPY(*set, &filter[-len - 1], len);
                        SF_PUSH(set);
                        set = NULL;
                        break;
index 7229fb37737d8f6ce3ce1100692e4ef77afdc9b1..9b9e01c809e3ccde6a8e7f2f2e924fde75e78de0 100644 (file)
@@ -118,7 +118,7 @@ syn_add(
 
        ssyn = (Syntax *) ch_calloc( 1, sizeof(Syntax) );
 
-       memcpy( &ssyn->ssyn_syn, syn, sizeof(LDAPSyntax) );
+       AC_MEMCPY( &ssyn->ssyn_syn, syn, sizeof(LDAPSyntax) );
 
        ssyn->ssyn_next = NULL;
 
index d91a70aa234497b6585bec88ea8c272b7b580e52..670ceeb8ae49bcf75fee1fee58599afa402bb64c 100644 (file)
@@ -173,12 +173,12 @@ strtok_quote(
            } else {
                inquote = 1;
            }
-           SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
+           AC_MEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
            break;
 
        case '\\':
            if ( next[1] )
-               SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
+               AC_MEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
            next++;             /* dont parse the escaped character */
            break;
 
index df1780c49e060c902ff1d806ce7a1509af56f481..2718ede4e8da32d1fc1c5aef1de53c0f7abd4c7b 100644 (file)
@@ -184,7 +184,7 @@ Re_parse(
            break;
        case T_DN:
            re->re_dn = ch_malloc( len + 1 );
-               memcpy( re->re_dn, value, len );
+               AC_MEMCPY( re->re_dn, value, len );
                re->re_dn[ len ]='\0';
            state |= GOT_DN;
            break;
@@ -234,7 +234,7 @@ Re_parse(
        re->re_mods[ nml ].mi_type = strdup( type );
        if ( value != NULL ) {
            re->re_mods[ nml ].mi_val = ch_malloc( len + 1 );
-               memcpy( re->re_mods[ nml ].mi_val, value, len );
+               AC_MEMCPY( re->re_mods[ nml ].mi_val, value, len );
                re->re_mods[ nml ].mi_val[ len ] = '\0';
            re->re_mods[ nml ].mi_len = len;
        } else {
index b555f71d64e5124a45c0b31b2743a4c0383e17ad..09849483e08be48e3e87a32f447b121a057b062a 100644 (file)
@@ -173,7 +173,7 @@ addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, char *value, int vlen )
                        perror( "malloc" );
                        exit( EXIT_FAILURE );
            }
-           SAFEMEMCPY( bvp->bv_val, value, vlen );
+           AC_MEMCPY( bvp->bv_val, value, vlen );
            bvp->bv_val[ vlen ] = '\0';
     }
 }