[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Running WML from WML?



On Thu, 6 May 1999, Ralf S. Engelschall wrote:

> The problem is that the runtime mode of ePerl is determined from the CGI
> environment. So when you want to force a different mode the environment has to
> be cleaned. Perhaps WML should always run ePerl with --mode=FILTER?

No Ralf, ``filter'' is the default (cf eperl manpage)

Below is a quick workaround ; there are 3 or 4 other memory allocations
without checks. I will fix them later, unless someone volunteer?
Stéphane, could you check if it solves your problem, please.

Denis

--- wml_backend/p3_eperl/eperl_sys.c.orig 1999/01/12 14:24:14     1.2
+++ wml_backend/p3_eperl/eperl_sys.c 1999/05/06 15:32:57
@@ -64,7 +64,12 @@
     /*  now duplicate the old structure  */
     for (i = 0; env[i] != NULL; i++)
         ;
-    envN = (char **)malloc(sizeof(char *) * (i+2));
+
+    if ((envN = (char **)malloc(sizeof(char *) * (i+2))) == NULL) {
+        va_end(ap);
+        return environ;
+    }
+
     for (i = 0; env[i] != NULL; i++) {
         if (strncmp(env[i], var, strlen(var)) == 0) {
             envN[i] = cp;

______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com