summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/ldconfig
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-12-18 16:50:08 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-12-18 16:50:08 +0000
commit486bc1351bf108c0a51c4c3dc53005fb629ff5f3 (patch)
treed28b5f5e9d19a461f71a0c041a2fbf5996789be7 /gnu/usr.bin/ld/ldconfig
parent70f426d4f4a5bdbebcdc39f04e88f931e6db3298 (diff)
Back out strcpy() -> strncpy() change. Not needed as the array is malloc'd
with enough space. Guess that's why I didn't commit this before ;-)
Diffstat (limited to 'gnu/usr.bin/ld/ldconfig')
-rw-r--r--gnu/usr.bin/ld/ldconfig/ldconfig.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gnu/usr.bin/ld/ldconfig/ldconfig.c b/gnu/usr.bin/ld/ldconfig/ldconfig.c
index 84e4fd57f61..6914a845dbb 100644
--- a/gnu/usr.bin/ld/ldconfig/ldconfig.c
+++ b/gnu/usr.bin/ld/ldconfig/ldconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldconfig.c,v 1.5 1996/12/18 04:55:53 millert Exp $ */
+/* $OpenBSD: ldconfig.c,v 1.6 1996/12/18 16:50:07 millert Exp $ */
/*
* Copyright (c) 1993,1995 Paul Kranenburg
@@ -344,13 +344,11 @@ buildhints()
/* Insert strings in string table */
bp->hi_namex = str_index;
- strncpy(strtab + str_index, shp->name, strtab_sz - str_index - 1);
- strtab[strtab_sz-1] = '\0';
+ strcpy(strtab + str_index, shp->name);
str_index += 1 + strlen(shp->name);
bp->hi_pathx = str_index;
- strncpy(strtab + str_index, shp->path, strtab_sz - str_index - 1);
- strtab[strtab_sz-1] = '\0';
+ strcpy(strtab + str_index, shp->path);
str_index += 1 + strlen(shp->path);
/* Copy versions */
@@ -359,8 +357,7 @@ buildhints()
}
/* Copy search directories */
- strncpy(strtab + str_index, dir_list, strtab_sz - str_index - 1);
- strtab[strtab_sz-1] = '\0';
+ strcpy(strtab + str_index, dir_list);
str_index += 1 + strlen(dir_list);
/* Sanity check */