diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2009-08-19 19:38:18 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2009-08-19 19:38:18 +0000 |
commit | 96a7c09747d71ff61a373d73fe917007d1280df3 (patch) | |
tree | c637a8c31a4bda0ff492c1a30c8a15f51f18ac2f /libexec | |
parent | 895a0f8a6188fa9649608c93852b14fa80245d86 (diff) |
In ldconfig the dewey field of shlib_list was only partially filled
as bcopy used the number of elements instead of the array's size.
As a consequence, the wrong version of a library could be selected
if the library had many minor numbers.
from Christian Rusch; ok otto@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/ldconfig/ldconfig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/ldconfig/ldconfig.c b/libexec/ld.so/ldconfig/ldconfig.c index 8fac2620e35..6617937cbdb 100644 --- a/libexec/ld.so/ldconfig/ldconfig.c +++ b/libexec/ld.so/ldconfig/ldconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldconfig.c,v 1.25 2006/06/26 23:26:12 drahn Exp $ */ +/* $OpenBSD: ldconfig.c,v 1.26 2009/08/19 19:38:17 bluhm Exp $ */ /* * Copyright (c) 1993,1995 Paul Kranenburg @@ -289,7 +289,7 @@ enter(char *dir, char *file, char *name, int dewey[], int ndewey) shp = (struct shlib_list *)xmalloc(sizeof *shp); shp->name = xstrdup(name); shp->path = concat(dir, "/", file); - bcopy(dewey, shp->dewey, MAXDEWEY); + bcopy(dewey, shp->dewey, sizeof(shp->dewey)); shp->ndewey = ndewey; shp->next = NULL; |