--- parser3/src/classes/hash.C 2009/07/06 08:49:49 1.97 +++ parser3/src/classes/hash.C 2009/07/07 06:27:05 1.100 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_HASH_C="$Date: 2009/07/06 08:49:49 $"; +static const char * const IDENT_HASH_C="$Date: 2009/07/07 06:27:05 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -232,9 +232,9 @@ static void _sub(Request& r, MethodParam } static void copy_all_dontoverwrite_to( - HashStringValue::key_type key, - HashStringValue::value_type value, - HashStringValue* dest) { + HashStringValue::key_type key, + HashStringValue::value_type value, + HashStringValue* dest) { dest->put_dont_replace(key, value); } static void _union(Request& r, MethodParams& params) { @@ -256,9 +256,9 @@ struct Copy_intersection_to_info { }; #endif static void copy_intersection_to( - HashStringValue::key_type key, - HashStringValue::value_type value, - Copy_intersection_to_info *info) { + HashStringValue::key_type key, + HashStringValue::value_type value, + Copy_intersection_to_info *info) { if(info->b->get(key)) info->dest->put_dont_replace(key, value); } @@ -276,9 +276,9 @@ static void _intersection(Request& r, Me } static bool intersects( - HashStringValue::key_type key, - HashStringValue::value_type /*value*/, - HashStringValue* b) { + HashStringValue::key_type key, + HashStringValue::value_type /*value*/, + HashStringValue* b) { return b->get(key)!=0; } @@ -354,7 +354,7 @@ static void _sql(Request& r, MethodParam Temp_lang temp_lang(r, String::L_SQL); const String& statement_string=r.process_to_string(statement); - const char* statement_cstr=statement_string.cstr(String::L_UNSPECIFIED, r.connection()); + const char* statement_cstr=statement_string.untaint_cstr(r.flang, r.connection()); HashStringValue& hash=GET_SELF(r, VHash).hash(); hash.clear(); @@ -376,10 +376,10 @@ static void _sql(Request& r, MethodParam } static void keys_collector( - HashStringValue::key_type key, - HashStringValue::value_type, - Table *table) { - Table::element_type row(new ArrayString); + HashStringValue::key_type key, + HashStringValue::value_type, + Table *table) { + Table::element_type row(new ArrayString(1)); *row+=new String(key, String::L_TAINTED); *table+=row; }