diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-09-29 20:40:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-09-29 20:40:36 +0000 |
commit | 9c13063ca6f2b176f231d4d30482ebb7c4cd8c1d (patch) | |
tree | a2b9c9c3d553cd7d80fa219593dd161fa4451466 /gnu/usr.bin/ld/ldconfig | |
parent | a22b9e9e0c554d814dc0d8a1a62fc00c58849ed9 (diff) |
bounded string handlings; ok otto
Diffstat (limited to 'gnu/usr.bin/ld/ldconfig')
-rw-r--r-- | gnu/usr.bin/ld/ldconfig/ldconfig.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/ld/ldconfig/ldconfig.c b/gnu/usr.bin/ld/ldconfig/ldconfig.c index 7d4380a6452..363cc01d7aa 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.17 2004/08/14 03:08:24 drahn Exp $ */ +/* $OpenBSD: ldconfig.c,v 1.18 2005/09/29 20:40:35 deraadt Exp $ */ /* * Copyright (c) 1993,1995 Paul Kranenburg @@ -361,11 +361,11 @@ buildhints(void) /* Insert strings in string table */ bp->hi_namex = str_index; - strcpy(strtab + str_index, shp->name); + strlcpy(strtab + str_index, shp->name, strtab_sz - str_index); str_index += 1 + strlen(shp->name); bp->hi_pathx = str_index; - strcpy(strtab + str_index, shp->path); + strlcpy(strtab + str_index, shp->path, strtab_sz - str_index); str_index += 1 + strlen(shp->path); /* Copy versions */ @@ -374,7 +374,7 @@ buildhints(void) } /* Copy search directories */ - strcpy(strtab + str_index, dir_list); + strlcpy(strtab + str_index, dir_list, strtab_sz - str_index); str_index += 1 + strlen(dir_list); /* Sanity check */ |