diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-08-12 00:58:52 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-08-12 00:58:52 +0000 |
commit | 93bcd55eafbcf2a49e8963c3475d5a7b1fbc8c53 (patch) | |
tree | 981e9591cd93532e591400b35b595735a6eee0b7 /ext/mysql/php_mysql.c | |
parent | 3652ab6032819e4854ae607fe8084cd129791983 (diff) | |
download | php-git-93bcd55eafbcf2a49e8963c3475d5a7b1fbc8c53.tar.gz |
emalloc -> safe_emalloc
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r-- | ext/mysql/php_mysql.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 03a9366444..f812d09137 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -1668,7 +1668,7 @@ PHP_FUNCTION(mysql_escape_string) * be worth it */ - Z_STRVAL_P(return_value) = (char *) emalloc(Z_STRLEN_PP(str)*2+1); + Z_STRVAL_P(return_value) = (char *) safe_emalloc(Z_STRLEN_PP(str), 2, 1); Z_STRLEN_P(return_value) = mysql_escape_string(Z_STRVAL_P(return_value), Z_STRVAL_PP(str), Z_STRLEN_PP(str)); Z_TYPE_P(return_value) = IS_STRING; @@ -1701,7 +1701,7 @@ PHP_FUNCTION(mysql_real_escape_string) ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, &mysql_link, id, "MySQL-Link", le_link, le_plink); - new_str = emalloc(str_len * 2 + 1); + new_str = safe_emalloc(str_len, 2, 1); new_str_len = mysql_real_escape_string(&mysql->conn, new_str, str, str_len); new_str = erealloc(new_str, new_str_len + 1); |