From a2051259af53d49fbafe603eb052ddc6990f27f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 23 Jun 2010 18:22:54 +0200 Subject: [PATCH] Fixed bug in generation of pike.so path in LIBPIKE mode. Rev: src/main.c:1.241 --- src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 84130078f4..6502c5edf6 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: main.c,v 1.240 2010/06/22 12:37:19 grubba Exp $ +|| $Id: main.c,v 1.241 2010/06/23 16:22:54 grubba Exp $ */ #include "global.h" @@ -287,14 +287,14 @@ static void find_lib_dir(int argc, char **argv) ) dir = p+1; } - if ((p + CONSTANT_STRLEN("pike.so")) >= libpike_file + 2*MAXPATHLEN) { + if ((dir + CONSTANT_STRLEN("pike.so")) >= libpike_file + 2*MAXPATHLEN) { /* Not likely to happen as long as MASTER_COOKIE is longer than "pike.so". */ fprintf(stderr, "Too long path to pike.so.\n"); exit(1); } /* Don't forget the NUL! */ - memcpy(p, "pike.so", CONSTANT_STRLEN("pike.so") + 1); + memcpy(dir, "pike.so", CONSTANT_STRLEN("pike.so") + 1); } #endif /* LIBPIKE */ } -- GitLab