httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sameer <sam...@c2.net>
Subject coredump bug in set_rlimit
Date Fri, 21 Feb 1997 18:37:12 GMT
If someone calls RLimitCPU with only one argument, apache will core.
Here's a patch

*** http_core.c 1997/01/31 03:56:31     1.9
--- http_core.c 1997/02/21 18:34:24     1.10
***************
*** 1020,1028 ****
        log_printf(cmd->server, "Invalid parameters for %s", cmd->cmd->name);
        return;
      }
!     
!     if ((str = getword_conf(cmd->pool, &arg2)))
!       max = atol(str);
  
      /* if we aren't running as root, cannot increase max */
      if (geteuid()) {
--- 1020,1034 ----
        log_printf(cmd->server, "Invalid parameters for %s", cmd->cmd->name);
        return;
      }
!     if(arg2 != NULL)
!       {
!       if ((str = getword_conf(cmd->pool, &arg2)))
!         max = atol(str);
!       }
!     else
!       {
!       max = 0;
!       }
  
      /* if we aren't running as root, cannot increase max */
      if (geteuid()) {

-- 
Sameer Parekh					Voice:   510-986-8770
President					FAX:     510-986-8777
C2Net
http://www.c2.net/				sameer@c2.net

Mime
View raw message