summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mysqli/mysqli.c2
-rw-r--r--ext/sqlite/sqlite.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 9138c07b01..a60246aa6e 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -630,7 +630,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
Bucket *p;
fci.param_count = 0;
- fci.params = emalloc(sizeof(zval*) * ht->nNumOfElements);
+ fci.params = safe_emalloc(sizeof(zval*), ht->nNumOfElements, 0);
p = ht->pListHead;
while (p != NULL) {
fci.params[fci.param_count++] = (zval**)p->pData;
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index 707c282172..fdac4bb7df 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -1942,7 +1942,7 @@ PHP_FUNCTION(sqlite_fetch_object)
Bucket *p;
fci.param_count = 0;
- fci.params = emalloc(sizeof(zval*) * ht->nNumOfElements);
+ fci.params = safe_emalloc(sizeof(zval*), ht->nNumOfElements, 0);
p = ht->pListHead;
while (p != NULL) {
fci.params[fci.param_count++] = (zval**)p->pData;