diff options
author | Antony Dovgal <tony2001@php.net> | 2007-07-10 11:07:56 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2007-07-10 11:07:56 +0000 |
commit | 2d42310d66a2108d1f0c68ee34bf4f356c4e5aac (patch) | |
tree | c946ac7b4d3c4b344e18012a4777f520790719ee /ext/bcmath/libbcmath/src/init.c | |
parent | b6f62bd0d4fea2568e0737f9b2d183d1c8cfa649 (diff) | |
download | php-git-2d42310d66a2108d1f0c68ee34bf4f356c4e5aac.tar.gz |
use safe_emalloc()
Diffstat (limited to 'ext/bcmath/libbcmath/src/init.c')
-rw-r--r-- | ext/bcmath/libbcmath/src/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bcmath/libbcmath/src/init.c b/ext/bcmath/libbcmath/src/init.c index cd45b9fbc1..986ad1df24 100644 --- a/ext/bcmath/libbcmath/src/init.c +++ b/ext/bcmath/libbcmath/src/init.c @@ -51,7 +51,7 @@ _bc_new_num_ex (length, scale, persistent) bc_num temp; /* PHP Change: malloc() -> pemalloc(), removed free_list code */ - temp = (bc_num) pemalloc (sizeof(bc_struct)+length+scale, persistent); + temp = (bc_num) safe_pemalloc (1, sizeof(bc_struct)+length, scale, persistent); #if 0 if (_bc_Free_list != NULL) { temp = _bc_Free_list; @@ -66,7 +66,7 @@ _bc_new_num_ex (length, scale, persistent) temp->n_scale = scale; temp->n_refs = 1; /* PHP Change: malloc() -> pemalloc() */ - temp->n_ptr = (char *) pemalloc (length+scale, persistent); + temp->n_ptr = (char *) safe_pemalloc (1, length, scale, persistent); if (temp->n_ptr == NULL) bc_out_of_memory(); temp->n_value = temp->n_ptr; memset (temp->n_ptr, 0, length+scale); |