--- parser3/src/include/pa_string.h 2001/05/14 13:18:07 1.87 +++ parser3/src/include/pa_string.h 2001/05/15 15:51:05 1.91 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_string.h,v 1.87 2001/05/14 13:18:07 parser Exp $ + $Id: pa_string.h,v 1.91 2001/05/15 15:51:05 parser Exp $ */ #ifndef PA_STRING_H @@ -27,7 +27,7 @@ class Table; - first for buffer length - second for replacements themselves */ -#define UNTAINT_TIMES_BIGGER 10 +#define UNTAINT_TIMES_BIGGER 20 #ifndef NO_STRING_ORIGIN # define STRING_APPEND_PARAMS \ @@ -85,8 +85,8 @@ class String : public Pooled { public: enum { - CR_PREALLOCATED_COUNT=5, ///< default preallocated item count - CR_GROW_PERCENT=60 ///< each time the Array chunk_is_full() array expanded() + CR_PREALLOCATED_COUNT=2, ///< default preallocated item count + CR_GROW_COUNT=2 ///< each time the String chunk_is_full() string expanded() }; /// piece is tainted or not. the language to use when detaint @@ -121,6 +121,7 @@ public: char *cstr(Untaint_lang lang=UL_UNSPECIFIED, SQL_Connection *connection=0, const char *charset=0) const { + char *result=(char *)malloc(size()*UNTAINT_TIMES_BIGGER+1); char *eol=store_to(result, lang, connection, charset); *eol=0;