--- parser3/src/sql/pgsql/Attic/parser3pgsql.C 2001/07/30 15:32:18 1.1 +++ parser3/src/sql/pgsql/Attic/parser3pgsql.C 2001/07/31 07:58:47 1.3 @@ -7,7 +7,7 @@ 2001.07.30 using PgSQL 7.1.2 */ -static const char *RCSId="$Id: parser3pgsql.C,v 1.1 2001/07/30 15:32:18 parser Exp $"; +static const char *RCSId="$Id: parser3pgsql.C,v 1.3 2001/07/31 07:58:47 parser Exp $"; #include "config_includes.h" @@ -21,8 +21,6 @@ static const char *RCSId="$Id: parser3pg #if _MSC_VER # define snprintf _snprintf -#endif -#ifndef strcasecmp # define strcasecmp _stricmp #endif @@ -103,11 +101,16 @@ public: it's already UNTAINT_TIMES_BIGGER */ - // ' -> '' unsigned int result=length; while(length--) { - if(*from=='\'') + switch(*from) { + case '\'': // "'" -> "''" + *to++='\''; + break; + case '\\': // "\" -> "\\" *to++='\''; + break; + } *to++=*from++; } return result;