From 5e4a565603cf29c43e3d1a2d7a1ee81ab11e6516 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Mon, 2 Jun 2008 01:35:47 +0300 Subject: [PATCH] Bug 1014: Fix incompatible pointer type in init_perl. The second argument of PERL_SYS_INIT3 should be a char *** but ELinks was giving it a char *(*)[1]. Also, enlarge the array to 2 elements, so that my_argv[my_argc] == NULL like in main(). PERL_SYS_INIT3 seems hardly documented at all so I'm not sure this is necessary, but it shouldn't hurt. (cherry picked from commit 8d0677e76adda01991d6f4092659a693633a9c1b) --- NEWS | 1 + src/scripting/perl/core.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 9165b2aa..29fcb803 100644 --- a/NEWS +++ b/NEWS @@ -316,6 +316,7 @@ To be released as 0.11.4. * major bug 788: don't read STRLEN n_a, which isn't initialized by POPpx of Perl v5.8.8 and later * fix query parsing in file: URIs for local CGI (was broken in 0.11.3) +* bug 451: fix incompatible pointer type in PERL_SYS_INIT3 call * bug 691: don't look up bogus IPv4 addresses based on characters of a hostname * bug 712: GnuTLS works on https://www-s.uiuc.edu/[] diff --git a/src/scripting/perl/core.c b/src/scripting/perl/core.c index fc599c2a..85d94283 100644 --- a/src/scripting/perl/core.c +++ b/src/scripting/perl/core.c @@ -77,7 +77,8 @@ init_perl(struct module *module) /* PERL_SYS_INIT3 may not be defined, it depends on the system. */ #ifdef PERL_SYS_INIT3 - char *my_argv[] = { NULL }; + char *my_argvec[] = { NULL, NULL }; + char **my_argv = my_argvec; int my_argc = 0; /* A hack to prevent unused variables warnings. */ -- 2.11.4.GIT