diff options
Diffstat (limited to 'lib/libc/db/hash')
-rw-r--r-- | lib/libc/db/hash/ndbm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/db/hash/ndbm.c b/lib/libc/db/hash/ndbm.c index e6f3dad6ac9..c0db9cd225f 100644 --- a/lib/libc/db/hash/ndbm.c +++ b/lib/libc/db/hash/ndbm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndbm.c,v 1.13 2002/02/16 21:27:22 millert Exp $ */ +/* $OpenBSD: ndbm.c,v 1.14 2002/06/05 17:21:36 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)dbm.c 8.6 (Berkeley) 11/7/95"; #else -static char rcsid[] = "$OpenBSD: ndbm.c,v 1.13 2002/02/16 21:27:22 millert Exp $"; +static char rcsid[] = "$OpenBSD: ndbm.c,v 1.14 2002/06/05 17:21:36 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -215,8 +215,7 @@ _dbm_open(file, suff, flags, mode) info.cachesize = 0; info.hash = NULL; info.lorder = 0; - (void)strcpy(path, file); - (void)strcat(path, suff); + snprintf(path, sizeof path, "%s%s", file, suff); return ((DBM *)__hash_open(path, flags, mode, &info, 0)); } |