diff options
author | 2002-06-05 17:21:36 +0000 | |
---|---|---|
committer | 2002-06-05 17:21:36 +0000 | |
commit | f15c780190e65e5707622670b649c53ab74c1e2f (patch) | |
tree | 196c1394efad8d6a8871b1bb4746647b3fa9c8c8 /lib/libc/db | |
parent | If send() returns ENOBUFS, sleep for one microsecond and retry. (diff) | |
download | wireguard-openbsd-f15c780190e65e5707622670b649c53ab74c1e2f.tar.xz wireguard-openbsd-f15c780190e65e5707622670b649c53ab74c1e2f.zip |
snprintf
Diffstat (limited to 'lib/libc/db')
-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)); } |