diff options
| author | Antony Dovgal <tony2001@php.net> | 2007-07-10 11:08:08 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2007-07-10 11:08:08 +0000 |
| commit | d0ee4977e70fb8c364c0bcce69f2be05016b8220 (patch) | |
| tree | 3ec8d2cbd2133aae3b9a6e36c462cb2895d073e3 /ext/bcmath/libbcmath/src/num2str.c | |
| parent | b0ef04af84a0a2958b84d35865991be99b4d6a26 (diff) | |
| download | php-git-d0ee4977e70fb8c364c0bcce69f2be05016b8220.tar.gz | |
MFH: use safe_emalloc()
Diffstat (limited to 'ext/bcmath/libbcmath/src/num2str.c')
| -rw-r--r-- | ext/bcmath/libbcmath/src/num2str.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bcmath/libbcmath/src/num2str.c b/ext/bcmath/libbcmath/src/num2str.c index c47ec9bbad..14c57726fe 100644 --- a/ext/bcmath/libbcmath/src/num2str.c +++ b/ext/bcmath/libbcmath/src/num2str.c @@ -51,9 +51,9 @@ char /* Allocate the string memory. */ signch = ( num->n_sign == PLUS ? 0 : 1 ); /* Number of sign chars. */ if (num->n_scale > 0) - str = (char *) emalloc (num->n_len + num->n_scale + 2 + signch); + str = (char *) safe_emalloc (1, num->n_len + num->n_scale, 2 + signch); else - str = (char *) emalloc (num->n_len + 1 + signch); + str = (char *) safe_emalloc (1, num->n_len, 1 + signch); if (str == NULL) bc_out_of_memory(); /* The negative sign if needed. */ |
