Skip to content
Snippets Groups Projects
Commit a2051259 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Fixed bug in generation of pike.so path in LIBPIKE mode.

Rev: src/main.c:1.241
parent 04e1b0e6
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment