summaryrefslogtreecommitdiffstats
path: root/source/tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-01-07 06:14:43 +0000
committerAndrew Tridgell <tridge@samba.org>2000-01-07 06:14:43 +0000
commitbf9b1328c5843eb217eff4ca05645498de2def82 (patch)
treefeffc822d55886231f12cd59c8773e79dbd397f5 /source/tdb
parent2dbe70da8db548b3423c6c0de0f282fdf82f0fad (diff)
downloadsamba-bf9b1328c5843eb217eff4ca05645498de2def82.tar.gz
samba-bf9b1328c5843eb217eff4ca05645498de2def82.tar.xz
samba-bf9b1328c5843eb217eff4ca05645498de2def82.zip
don't use strcpy
Diffstat (limited to 'source/tdb')
-rw-r--r--source/tdb/tdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c
index aec546a3108..eb751be32b5 100644
--- a/source/tdb/tdb.c
+++ b/source/tdb/tdb.c
@@ -478,7 +478,8 @@ static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size)
int i;
/* create the header */
- strcpy(header.magic_food, TDB_MAGIC_FOOD);
+ memset(&header, 0, sizeof(header));
+ memcpy(header.magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
header.version = TDB_VERSION;
header.hash_size = hash_size;
lseek(tdb->fd, 0, SEEK_SET);