]> granicus.if.org Git - php/commitdiff
emalloc() -> safe_emalloc()
authorIlia Alshanetsky <iliaa@php.net>
Wed, 31 Dec 2003 19:45:46 +0000 (19:45 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 31 Dec 2003 19:45:46 +0000 (19:45 +0000)
ext/mysqli/mysqli.c
ext/sqlite/sqlite.c

index 9138c07b01bde6f0090ce67d06d7bf70d6f15fbf..a60246aa6e1ab1d49496a0b964fef0a73170d61d 100644 (file)
@@ -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;
index 707c28217278f3dbb53eae77b58cdff3912c22bd..fdac4bb7df3aaff1b60d8ff3775001165546cc50 100644 (file)
@@ -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;