diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-01-07 06:14:43 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-01-07 06:14:43 +0000 |
commit | bf9b1328c5843eb217eff4ca05645498de2def82 (patch) | |
tree | feffc822d55886231f12cd59c8773e79dbd397f5 /source/tdb | |
parent | 2dbe70da8db548b3423c6c0de0f282fdf82f0fad (diff) | |
download | samba-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.c | 3 |
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); |