Diff for /embedaddon/php/ext/standard/base64.c between versions 1.1.1.2 and 1.1.1.4

version 1.1.1.2, 2012/05/29 12:34:43 version 1.1.1.4, 2014/06/15 20:03:57
Line 2 Line 2
    +----------------------------------------------------------------------+     +----------------------------------------------------------------------+
    | PHP Version 5                                                        |     | 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,      |     | 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        |     | that is bundled with this package in the file LICENSE, and is        |
Line 59  PHPAPI unsigned char *php_base64_encode(const unsigned Line 59  PHPAPI unsigned char *php_base64_encode(const unsigned
         unsigned char *p;          unsigned char *p;
         unsigned char *result;          unsigned char *result;
   
        if ((length + 2) < 0 || ((length + 2) / 3) >= (1 << (sizeof(int) * 8 - 2))) {        if (length < 0) {
                 if (ret_length != NULL) {                  if (ret_length != NULL) {
                         *ret_length = 0;                          *ret_length = 0;
                 }                  }
                 return NULL;                  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;          p = result;
   
         while (length > 2) { /* keep going until we have less than 24 bits */          while (length > 2) { /* keep going until we have less than 24 bits */

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>