From 7efb0a14f435e4ffb7ffc8f502ca07ec1d6872a1 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 25 Dec 2006 21:41:04 +0000 Subject: Use safe_emalloc() --- ext/pdo_dblib/dblib_driver.c | 2 +- ext/pdo_dblib/dblib_stmt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/pdo_dblib') 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 { -- cgit v1.2.1