ITS#6467, use memcpy instead for strcpy when copying across array

boundaries. To account for stricter checks when using -D_FORTIFY_SOURCE=2
with GCC 4.5
This commit is contained in:
Ralf Haferkamp 2010-02-15 15:25:47 +00:00
parent 3cd65c0a5d
commit 5ceb2cd4e0

View File

@ -680,7 +680,7 @@ hdb_dn2id_delete(
d->nrdnlen[0] = (BEI(e)->bei_nrdn.bv_len >> 8) | 0x80;
dlen[0] = d->nrdnlen[0];
dlen[1] = d->nrdnlen[1];
strcpy( d->nrdn, BEI(e)->bei_nrdn.bv_val );
memcpy( d->nrdn, BEI(e)->bei_nrdn.bv_val, BEI(e)->bei_nrdn.bv_len+1 );
data.data = d;
rc = db->cursor( db, txn, &cursor, bdb->bi_db_opflags );