summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-07-11 14:46:01 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-07-11 14:46:01 +0000
commite21f5f959237b1abc73df3ee72467ecb737ce280 (patch)
tree71299566d7dd9056163c149b757cf46bc0ce25c7 /ext
parentb3aa24ff986d788acfa01004d6887ed6b47b7f8c (diff)
downloadphp-git-e21f5f959237b1abc73df3ee72467ecb737ce280.tar.gz
A bit of further tuning.
Diffstat (limited to 'ext')
-rwxr-xr-xext/pdo_mysql/mysql_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 6002468401..b57599c322 100755
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -240,10 +240,10 @@ static char *pdo_mysql_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned
static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type paramtype TSRMLS_DC)
{
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
- *quoted = emalloc(2*unquotedlen + 3);
+ *quoted = safe_emalloc(2, unquotedlen, 3);
*quotedlen = mysql_real_escape_string(H->server, *quoted + 1, unquoted, unquotedlen);
- (*quoted)[0] =(*quoted)[*quotedlen + 1] = '"';
- (*quoted)[*quotedlen+=2] = '\0';
+ (*quoted)[0] =(*quoted)[++*quotedlen] = '"';
+ (*quoted)[++*quotedlen] = '\0';
return 1;
}