httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_include.c
Date Thu, 21 Mar 2002 16:48:46 GMT
jwoolley    02/03/21 08:48:46

  Modified:    src/modules/standard mod_include.c
  Log:
  handle_if() and handle_elif() were now correctly checking return codes,
  but send_parsed_content() was ignoring THEIR return codes, resulting in
  another segfault in a related set of circumstances.  In all cases we
  should consider ret!=0 from any of the handle_foo() functions to mean
  premature EOF was encountered.
  
  Revision  Changes    Path
  1.134     +14 -6     apache-1.3/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_include.c,v
  retrieving revision 1.133
  retrieving revision 1.134
  diff -u -d -u -r1.133 -r1.134
  --- mod_include.c	21 Mar 2002 06:13:21 -0000	1.133
  +++ mod_include.c	21 Mar 2002 16:48:46 -0000	1.134
  @@ -2222,6 +2222,7 @@
                   return;
               }
               if (!strcmp(directive, "if")) {
  +                ret = 0;
                   if (!printing) {
                       if_nesting++;
                   }
  @@ -2230,23 +2231,29 @@
                                       &printing);
                       if_nesting = 0;
                   }
  -                continue;
  +                if (!ret)
  +                    continue;
               }
               else if (!strcmp(directive, "else")) {
  +                ret = 0;
                   if (!if_nesting) {
                       ret = handle_else(f, r, error, &conditional_status,
                                         &printing);
                   }
  -                continue;
  +                if (!ret)
  +                    continue;
               }
               else if (!strcmp(directive, "elif")) {
  +                ret = 0;
                   if (!if_nesting) {
                       ret = handle_elif(f, r, error, &conditional_status,
                                         &printing);
                   }
  -                continue;
  +                if (!ret)
  +                    continue;
               }
               else if (!strcmp(directive, "endif")) {
  +                ret = 0;
                   if (!if_nesting) {
                       ret = handle_endif(f, r, error, &conditional_status,
                                          &printing);
  @@ -2254,12 +2261,13 @@
                   else {
                       if_nesting--;
                   }
  -                continue;
  +                if (!ret)
  +                    continue;
               }
  -            if (!printing) {
  +            else if (!printing) {
                   continue;
               }
  -            if (!strcmp(directive, "exec")) {
  +            else if (!strcmp(directive, "exec")) {
                   if (noexec) {
                       ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
   				  "exec used but not allowed in %s",
  
  
  

Mime
View raw message