--- embedaddon/php/ext/standard/base64.c	2012/02/21 23:48:02	1.1
+++ embedaddon/php/ext/standard/base64.c	2014/06/15 20:03:57	1.1.1.4
@@ -2,7 +2,7 @@
    +----------------------------------------------------------------------+
    | PHP Version 5                                                        |
    +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2012 The PHP Group                                |
+   | Copyright (c) 1997-2014 The PHP Group                                |
    +----------------------------------------------------------------------+
    | This source file is subject to version 3.01 of the PHP license,      |
    | that is bundled with this package in the file LICENSE, and is        |
@@ -15,7 +15,7 @@
    | Author: Jim Winstead <jimw@php.net>                                  |
    +----------------------------------------------------------------------+
  */
-/* $Id: base64.c,v 1.1 2012/02/21 23:48:02 misho Exp $ */
+/* $Id: base64.c,v 1.1.1.4 2014/06/15 20:03:57 misho Exp $ */
 
 #include <string.h>
 
@@ -59,14 +59,14 @@ PHPAPI unsigned char *php_base64_encode(const unsigned
 	unsigned char *p;
 	unsigned char *result;
 
-	if ((length + 2) < 0 || ((length + 2) / 3) >= (1 << (sizeof(int) * 8 - 2))) {
+	if (length < 0) {
 		if (ret_length != NULL) {
 			*ret_length = 0;
 		}
 		return NULL;
 	}
 
-	result = (unsigned char *)safe_emalloc(((length + 2) / 3) * 4, sizeof(char), 1);
+	result = (unsigned char *) safe_emalloc((length + 2) / 3, 4 * sizeof(char), 1);
 	p = result;
 
 	while (length > 2) { /* keep going until we have less than 24 bits */