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 | 102e44e446035bdcc7611b8b556d0e20978fbb80 (patch) | |
tree | 9aa8caedea09e7a29d6f13de371194deb76d645f /source3/tdb/tdb.c | |
parent | 112faa49e60d56bfd5fb0a5d2d40442c607577d9 (diff) | |
download | samba-102e44e446035bdcc7611b8b556d0e20978fbb80.tar.gz samba-102e44e446035bdcc7611b8b556d0e20978fbb80.tar.bz2 samba-102e44e446035bdcc7611b8b556d0e20978fbb80.zip |
don't use strcpy
(This used to be commit bf9b1328c5843eb217eff4ca05645498de2def82)
Diffstat (limited to 'source3/tdb/tdb.c')
-rw-r--r-- | source3/tdb/tdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index aec546a310..eb751be32b 100644 --- a/source3/tdb/tdb.c +++ b/source3/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); |