summaryrefslogtreecommitdiff
path: root/ext/pdo_dblib
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-12-25 21:41:04 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-12-25 21:41:04 +0000
commit7efb0a14f435e4ffb7ffc8f502ca07ec1d6872a1 (patch)
tree10139a1c36124c4d47360d48abea996b624979de /ext/pdo_dblib
parent807a0966a9dcf37614100842d313ee96f5977391 (diff)
downloadphp-git-7efb0a14f435e4ffb7ffc8f502ca07ec1d6872a1.tar.gz
Use safe_emalloc()
Diffstat (limited to 'ext/pdo_dblib')
-rw-r--r--ext/pdo_dblib/dblib_driver.c2
-rw-r--r--ext/pdo_dblib/dblib_stmt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index f8e1504a0e..e315562eb1 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -144,7 +144,7 @@ static int dblib_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote
char *q;
int l = 1;
- *quoted = q = emalloc(2 * unquotedlen + 3);
+ *quoted = q = safe_emalloc(2, unquotedlen, 3);
*q++ = '\'';
while (unquotedlen--) {
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index d4e77fae86..a8f01a5c10 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -131,7 +131,7 @@ static int pdo_dblib_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
arows = 100;
size = S->ncols * sizeof(pdo_dblib_colval);
- S->rows = emalloc(arows * size);
+ S->rows = safe_emalloc(arows, size, 0);
/* let's fetch all the data */
do {