summaryrefslogtreecommitdiff
path: root/ext/standard/uuencode.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-12-25 21:41:04 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-12-25 21:41:04 +0000
commit7efb0a14f435e4ffb7ffc8f502ca07ec1d6872a1 (patch)
tree10139a1c36124c4d47360d48abea996b624979de /ext/standard/uuencode.c
parent807a0966a9dcf37614100842d313ee96f5977391 (diff)
downloadphp-git-7efb0a14f435e4ffb7ffc8f502ca07ec1d6872a1.tar.gz
Use safe_emalloc()
Diffstat (limited to 'ext/standard/uuencode.c')
-rw-r--r--ext/standard/uuencode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c
index 536ad4038b..8d04c3cf4e 100644
--- a/ext/standard/uuencode.c
+++ b/ext/standard/uuencode.c
@@ -71,7 +71,7 @@ PHPAPI int php_uuencode(char *src, int src_len, char **dest)
char *p, *s, *e, *ee;
/* encoded length is ~ 38% greater then the original */
- p = *dest = emalloc((ceil(src_len * 1.38) + 45 + 1));
+ p = *dest = safe_emalloc(ceil(src_len * 1.38), 1, 46);
s = src;
e = src + src_len;
@@ -128,7 +128,7 @@ PHPAPI int php_uudecode(char *src, int src_len, char **dest)
int len, total_len=0;
char *s, *e, *p, *ee;
- p = *dest = emalloc(ceil(src_len * 0.75) + 1);
+ p = *dest = safe_emalloc(ceil(src_len * 0.75), 1, 1);
s = src;
e = src + src_len;