From 5ceb2cd4e0f4e766be0bc10211a734b7791f3a32 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Mon, 15 Feb 2010 15:25:47 +0000 Subject: [PATCH] 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 --- servers/slapd/back-bdb/dn2id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index 7fd05d4507..9b4c0392b3 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -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 ); -- 2.39.5