]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.2' into PHP-7.3
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 14 Jan 2019 09:23:44 +0000 (10:23 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 14 Jan 2019 09:23:44 +0000 (10:23 +0100)
1  2 
NEWS
ext/mbstring/mbstring.c

diff --cc NEWS
index c2bb842df6a9cfe4c3194d239238712ef9bf9e07,71f69919abeb20c7e28f2ce58146d1eba059e501..951154e5de85c391ea21ed1e8cf830124e0a1330
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -25,8 -12,8 +25,10 @@@ PH
    . Fixed bug #77391 (1bpp BMPs may fail to be loaded). (Romain Déoux, cmb)
  
  - Mbstring:
 +  . Fixed bug #77428 (mb_ereg_replace() doesn't replace a substitution
 +    variable). (Nikita)
+   . Fixed bug #77454 (mb_scrub() silently truncates after a null byte).
+     (64796c6e69 at gmail dot com)
  
  - MySQLnd:
    . Fixed bug #75684 (In mysqlnd_ext_plugin.h the plugin methods family has
index ae8c4bef7f38854842ea30007cbdef7163d1a66b,9973313985c081884b02dd421e6976b86557e65c..0e255e98d2718fad5d2d0c74c34729d8ef6c1cc3
@@@ -5010,23 -5260,21 +5010,22 @@@ PHP_FUNCTION(mb_chr
  /* }}} */
  
  
- static inline char* php_mb_scrub(const char* str, size_t str_len, const mbfl_encoding *enc)
 -static inline char* php_mb_scrub(const char* str, size_t str_len, const char* enc, size_t *ret_len)
++static inline char* php_mb_scrub(const char* str, size_t str_len, const mbfl_encoding *enc, size_t *ret_len)
  {
-       size_t ret_len;
-       return php_mb_convert_encoding_ex(str, str_len, enc, enc, &ret_len);
 -      return php_mb_convert_encoding(str, str_len, enc, enc, ret_len);
++      return php_mb_convert_encoding_ex(str, str_len, enc, enc, ret_len);
  }
  
  
  /* {{{ proto string|false mb_scrub([string str[, string encoding]]) */
  PHP_FUNCTION(mb_scrub)
  {
 +      const mbfl_encoding *enc;
        char* str;
        size_t str_len;
 -      char *enc = NULL;
 -      size_t enc_len;
 +      char *enc_name = NULL;
 +      size_t enc_name_len;
        char *ret;
+       size_t ret_len;
  
        ZEND_PARSE_PARAMETERS_START(1, 2)
                Z_PARAM_STRING(str, str_len)