summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2003-10-26 23:23:12 +0000
committerdrahn <drahn@openbsd.org>2003-10-26 23:23:12 +0000
commitc65380ab37f2d194f843c78b81ef93634604cd22 (patch)
tree9f799366889b7981e4701019b3f0a1dee51680c1
parentper deraadt@ request, don't permit insanely large stackgap values. (diff)
downloadwireguard-openbsd-c65380ab37f2d194f843c78b81ef93634604cd22.tar.xz
wireguard-openbsd-c65380ab37f2d194f843c78b81ef93634604cd22.zip
Work around a problem with shared libraries named as libX-A.B.so.X.Y.
Without this patch, the standard major:minor version matching failed. ok brad@
-rw-r--r--libexec/ld.so/sod.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libexec/ld.so/sod.c b/libexec/ld.so/sod.c
index 9e8e3db24f5..2c709265ef5 100644
--- a/libexec/ld.so/sod.c
+++ b/libexec/ld.so/sod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sod.c,v 1.18 2003/07/06 20:03:57 deraadt Exp $ */
+/* $OpenBSD: sod.c,v 1.19 2003/10/26 23:23:12 drahn Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -95,8 +95,14 @@ _dl_build_sod(const char *name, struct sod *sodp)
break;
case 1:
/* 'so' extension */
- if (_dl_strcmp(tok, "so") != 0)
- goto backout;
+ if (_dl_strcmp(tok, "so") != 0) {
+ /*
+ * filenames such as libX-A.B.so.X.Y
+ * screw this up, decrement tuplet
+ * and try to continue.
+ */
+ tuplet--;
+ }
break;
case 2:
/* major version extension */