You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2001/04/02 19:08:04 UTC

cvs commit: httpd-2.0/server config.c

trawick     01/04/02 10:08:04

  Modified:    .        CHANGES
               server   config.c
  Log:
  Fix segfaults for configuration file syntax errors such as
  "<Directory>" followed by "</Directory" and "<Directory>" followed
  by "</Directoryz>"
  
  Revision  Changes    Path
  1.155     +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- CHANGES	2001/04/02 16:15:30	1.154
  +++ CHANGES	2001/04/02 17:08:02	1.155
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.16-dev
   
  +  *) Fix segfaults for configuration file syntax errors such as
  +     "<Directory>" followed by "</Directory" and
  +     "<Directory>" followed by "</Directoryz>".  [Jeff Trawick]
  +
     *) Cleanup the --enable-layout option of configure.  This makes
        us use a consistent location for the config.layout file, and it
        makes configure more portable.
  
  
  
  1.122     +2 -0      httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- config.c	2001/03/27 19:19:08	1.121
  +++ config.c	2001/04/02 17:08:03	1.122
  @@ -864,12 +864,14 @@
   	    char *bracket = cmd_name + strlen(cmd_name) - 1;
   
   	    if (*bracket != '>') {
  +                parms->err_directive = newdir;
   		return apr_pstrcat(p, cmd_name,
   				  "> directive missing closing '>'", NULL);
   	    }
   	    *bracket = '\0';
   	    if (strcasecmp(cmd_name + 2,
   			    (*curr_parent)->directive + 1) != 0) {
  +                parms->err_directive = newdir;
   		return apr_pstrcat(p, "Expected </",
   				  (*curr_parent)->directive + 1, "> but saw ",
   				  cmd_name, ">", NULL);