www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Kelly <John.Ke...@bellhow.com>
Subject mod_jserv/3253: jserv_wrapper_win.c does not generate the correct command line to start the jre
Date Tue, 20 Oct 1998 15:01:23 GMT

>Number:         3253
>Category:       mod_jserv
>Synopsis:       jserv_wrapper_win.c does not generate the correct command line to start
the jre
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Oct 20 08:10:00 PDT 1998
>Last-Modified:
>Originator:     John.Kelly@bellhow.com
>Organization:
apache
>Release:        Apach-JServ-19981019
>Environment:
Windows NT 4.0 Service Pack 3
Apache 1.3.3
JServ 19981019
Sun JDK 1.1.7
Sun Jre 1.1.7
>Description:
jserv_wrapper_win.c does not handle the bin.parameters command line arguments
correctly.  It simply concatenates the pointer to the cfg->binparam to the
command line argument string.  This results in random data being passed to the
java runtime.
>How-To-Repeat:
Simply specify command line parameters to the java runtime.
>Fix:
Yes.  Context diff included.
*** Apache-JServ-19981019/src/c/jserv_wrapper_win.c	Tue Aug 11 20:07:58 1998
--- /kelly/Apache_1.3.3/src/modules/jserv/jserv_wrapper_win.c	Tue Oct 20 09:01:21 1998
***************
*** 146,154 ****
      char *commandline=NULL;
      char *environment=NULL;
      wrapper_property *cur=cfg->environment;
  
      /* Setup command line */
!     commandline=ap_pstrcat(wrapper_pool, cfg->bin, " ", cfg->binparam, " ", 
                             cfg->class, " ", cfg->config->properties, " ",
                             cfg->classparam, NULL);
  
--- 146,173 ----
      char *commandline=NULL;
      char *environment=NULL;
      wrapper_property *cur=cfg->environment;
+     char *params;
+     wrapper_property_list_node * binparams = cfg->binparam;
  
+ 
+     binparams = cfg->binparam;
+     /* Should be a DEFINE MAX_PARAM_LENGTH or something */
+     if ((params=ap_palloc(wrapper_pool, 255)) == NULL) {
+        jserv_error(JSERV_LOG_INFO,cfg->config,
+ 		   "wrapper: can not allocate memory");
+        return NULL;
+     } else {
+       *params='\0';
+       while (binparams != NULL) {
+         if (binparams->name != NULL && *(binparams->name) != '\0') {
+             strcat(params, binparams->name);
+ 	    strcat(params, " ");
+         }
+         binparams = binparams->next;
+       }
+     }
      /* Setup command line */
!     commandline=ap_pstrcat(wrapper_pool, cfg->bin, " ", params, " ", 
                             cfg->class, " ", cfg->config->properties, " ",
                             cfg->classparam, NULL);
  
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]




Mime
View raw message