httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Wed, 13 Mar 2002 20:32:29 GMT
trawick     02/03/13 12:32:28

  Modified:    .        CHANGES
               modules/filters mod_include.c
  Log:
  Fix some mod_include bugs which broke the evaluation of some expressions.
  
  There are a few instances of the same basic problem which are not yet
  fixed and which I have marked with /* XXX.*FUBAR*/.
  
  PR:      10108
  
  Revision  Changes    Path
  1.632     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.631
  retrieving revision 1.632
  diff -u -r1.631 -r1.632
  --- CHANGES	13 Mar 2002 12:40:58 -0000	1.631
  +++ CHANGES	13 Mar 2002 20:32:27 -0000	1.632
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.34-dev
   
  +  *) Fix some mod_include problems which broke evaluation of some
  +     expressions.  PR 10108  [Jeff Trawick]
  +
     *) Fix the calculation of request time in mod_status.  [Stas Bekman]
   
     *) Fix the calculation of thread_num in the worker score structure.
  
  
  
  1.197     +10 -14    httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.196
  retrieving revision 1.197
  diff -u -r1.196 -r1.197
  --- mod_include.c	8 Mar 2002 04:14:26 -0000	1.196
  +++ mod_include.c	13 Mar 2002 20:32:28 -0000	1.197
  @@ -1901,12 +1901,15 @@
               case token_string:
                   if (current->token.value[0] != '\0') {
                       strncat(current->token.value, " ",
  +                         /* XXX sizeof() use is FUBAR */
                            sizeof(current->token.value)
                               - strlen(current->token.value) - 1);
                   }
                   strncat(current->token.value, new->token.value,
  +                         /* XXX sizeof() use is FUBAR */
                            sizeof(current->token.value)
                               - strlen(current->token.value) - 1);
  +                /* XXX sizeof() use is FUBAR */
                   current->token.value[sizeof(current->token.value) - 1] = '\0';
                   break;
               case token_eq:
  @@ -2211,8 +2214,7 @@
   #endif
               buffer = ap_ssi_parse_string(r, ctx, current->token.value, NULL, 
                                            MAX_STRING_LEN, 0);
  -            apr_cpystrn(current->token.value, buffer, 
  -                        sizeof(current->token.value));
  +            current->token.value = buffer;
               current->value = (current->token.value[0] != '\0');
               current->done = 1;
               current = current->parent;
  @@ -2245,8 +2247,7 @@
                   case token_string:
                       buffer = ap_ssi_parse_string(r, ctx, current->left->token.value,
                                                    NULL, MAX_STRING_LEN, 0);
  -                    apr_cpystrn(current->left->token.value, buffer,
  -                                sizeof(current->left->token.value));
  +                    current->left->token.value = buffer;
                       current->left->value = 
                                          (current->left->token.value[0] != '\0');
                       current->left->done = 1;
  @@ -2261,8 +2262,7 @@
                   case token_string:
                       buffer = ap_ssi_parse_string(r, ctx, current->right->token.value,
                                                    NULL, MAX_STRING_LEN, 0);
  -                    apr_cpystrn(current->right->token.value, buffer,
  -                                sizeof(current->right->token.value));
  +                    current->right->token.value = buffer;
                       current->right->value = 
                                         (current->right->token.value[0] != '\0');
                       current->right->done = 1;
  @@ -2312,12 +2312,10 @@
               }
               buffer = ap_ssi_parse_string(r, ctx, current->left->token.value,
                                            NULL, MAX_STRING_LEN, 0);
  -            apr_cpystrn(current->left->token.value, buffer,
  -                        sizeof(current->left->token.value));
  +            current->left->token.value = buffer;
               buffer = ap_ssi_parse_string(r, ctx, current->right->token.value,
                                            NULL, MAX_STRING_LEN, 0);
  -            apr_cpystrn(current->right->token.value, buffer,
  -                        sizeof(current->right->token.value));
  +            current->right->token.value = buffer;
               if (current->right->token.type == token_re) {
   #ifdef DEBUG_INCLUDE
                   debug_pos += sprintf (&debug[debug_pos],
  @@ -2371,12 +2369,10 @@
               }
               buffer = ap_ssi_parse_string(r, ctx, current->left->token.value,
                                            NULL, MAX_STRING_LEN, 0);
  -            apr_cpystrn(current->left->token.value, buffer,
  -                        sizeof(current->left->token.value));
  +            current->left->token.value = buffer;
               buffer = ap_ssi_parse_string(r, ctx, current->right->token.value,
                                            NULL, MAX_STRING_LEN, 0);
  -            apr_cpystrn(current->right->token.value, buffer,
  -                        sizeof(current->right->token.value));
  +            current->right->token.value = buffer;
   #ifdef DEBUG_INCLUDE
               debug_pos += sprintf (&debug[debug_pos],
                                     "     Compare (%s) with (%s)\n",
  
  
  

Mime
View raw message