diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-15 10:06:22 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-15 10:06:22 +0000 |
| commit | 2bd2a0b597912994b44aaaba0d097549cbefd49c (patch) | |
| tree | c557188a0ccff743418ed973b81becfa018770f6 /src/libs | |
| parent | 4894534baa0876a46909fb4429093a2289a4d9ef (diff) | |
| download | zabbix-2bd2a0b597912994b44aaaba0d097549cbefd49c.tar.gz zabbix-2bd2a0b597912994b44aaaba0d097549cbefd49c.tar.xz zabbix-2bd2a0b597912994b44aaaba0d097549cbefd49c.zip | |
- finished WEB monitoring (Eugene)
- tested WEB monitoring (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4137 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs')
| -rw-r--r-- | src/libs/zbxdbhigh/db.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c index 5cc1a6b9..26bcf90d 100644 --- a/src/libs/zbxdbhigh/db.c +++ b/src/libs/zbxdbhigh/db.c @@ -1422,13 +1422,10 @@ char* DBdyn_escape_string(const char *str) char *str_esc = NULL; int str_esc_len; - - assert(str); - - str_esc_len = strlen(str)+1; - for(i=0; str[i]; i++) + for(i=0; str && str[i]; i++) { + str_esc_len++; if( ( str[i] == '\'' ) #ifndef HAVE_ORACLE || ( str[i] == '\\' ) @@ -1438,6 +1435,7 @@ char* DBdyn_escape_string(const char *str) str_esc_len++; } } + str_esc_len++; str_esc = zbx_malloc(str_esc_len); |
