|
|
| version 1.1, 2001/07/30 15:32:18 | version 1.3, 2001/07/31 07:58:47 |
|---|---|
| Line 21 static const char *RCSId="$Id$"; | Line 21 static const char *RCSId="$Id$"; |
| #if _MSC_VER | #if _MSC_VER |
| # define snprintf _snprintf | # define snprintf _snprintf |
| #endif | |
| #ifndef strcasecmp | |
| # define strcasecmp _stricmp | # define strcasecmp _stricmp |
| #endif | #endif |
| Line 103 public: | Line 101 public: |
| it's already UNTAINT_TIMES_BIGGER | it's already UNTAINT_TIMES_BIGGER |
| */ | */ |
| // ' -> '' | |
| unsigned int result=length; | unsigned int result=length; |
| while(length--) { | while(length--) { |
| if(*from=='\'') | switch(*from) { |
| case '\'': // "'" -> "''" | |
| *to++='\''; | |
| break; | |
| case '\\': // "\" -> "\\" | |
| *to++='\''; | *to++='\''; |
| break; | |
| } | |
| *to++=*from++; | *to++=*from++; |
| } | } |
| return result; | return result; |