Diff for /parser3/src/main/untaint.C between versions 1.115.2.12.2.15 and 1.115.2.12.2.16

version 1.115.2.12.2.15, 2003/03/25 12:39:14 version 1.115.2.12.2.16, 2003/03/25 13:58:38
Line 22  extern "C" { // author forgot to do that Line 22  extern "C" { // author forgot to do that
 #include "ec.h"  #include "ec.h"
 }  }
   
 //#define PA_SQL  #define PA_SQL
   
 #ifdef PA_SQL  #ifdef PA_SQL
 #include "pa_sql_connection.h"  #include "pa_sql_connection.h"
Line 313  StringBody String::cstr_to_string_body(L Line 313  StringBody String::cstr_to_string_body(L
                 case L_URI:                  case L_URI:
                         // tainted, untaint language: uri                          // tainted, untaint language: uri
                         {                          {
                                 size_t source_size;                                  const char *fragment_str=body.mid(fragment_begin, fragment_length).cstr();
                                 const char *source_ptr=  
                                         body.mid(fragment_begin, source_size=fragment_length).cstr();  
                                 // skip source [we use recoded version]                                  // skip source [we use recoded version]
                                 CORD_pos_advance(pos, source_size);                                  CORD_pos_advance(pos, fragment_length);
                                 const void *client_ptr;                                  const void *client_ptr;
                                 size_t client_size;                                  size_t client_size;
                                 if(charsets)                                   if(charsets) 
                                         Charset::transcode(                                          Charset::transcode(
                                                 charsets->source(), source_ptr, source_size,                                                  charsets->source(), fragment_str, fragment_length,
                                                 charsets->client(), client_ptr, client_size);                                                  charsets->client(), client_ptr, client_size);
                                 else {                                  else {
                                         client_ptr=source_ptr;                                           client_ptr=fragment_str; 
                                         client_size=source_size;                                          client_size=fragment_length;
                                 }                                  }
   
                                 char c;                                  char c;
Line 398  StringBody String::cstr_to_string_body(L Line 396  StringBody String::cstr_to_string_body(L
                 case L_SQL:                  case L_SQL:
                         // tainted, untaint language: sql                          // tainted, untaint language: sql
                         if(connection) {                          if(connection) {
                                 dest+=connection->quote(0,                                   const char *fragment_str=body.mid(fragment_begin, fragment_length).cstr();
                                         CORD_substr(body, fragment_begin, fragment_length),                                   // skip source [we use recoded version]
                                         fragment_length);                                  CORD_pos_advance(pos, fragment_length);
 ...^^^  
   
                                 dest+=connection->quote(dest, fragment.ptr, fragment_length);                                  to_string(connection->quote(fragment_str, fragment_length));
                         else                          } else
                                 throw Exception(0,                                  throw Exception(0,
                                         0,                                          0,
                                         "untaint in SQL language failed - no connection specified");                                          "untaint in SQL language failed - no connection specified");

Removed from v.1.115.2.12.2.15  
changed lines
  Added in v.1.115.2.12.2.16


E-mail: