]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Jan 2020 10:49:27 +0000 (11:49 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Jan 2020 10:49:27 +0000 (11:49 +0100)
* PHP-7.4:
  Fix recovery of large entities in mb_decode_numericentity()

1  2 
ext/mbstring/libmbfl/mbfl/mbfilter.c
ext/mbstring/tests/mb_decode_numericentity.phpt

Simple merge
index 5a29144c44b9fc89b5f0f67c791e399536106f3e,b6a7c622a668cd5ab710b3643ca97130c7a46125..7dcd0108b2a690b72155ef7a01141db1d2ae7704
@@@ -15,19 -15,15 +15,27 @@@ echo mb_decode_numericentity($str1, $co
  echo mb_decode_numericentity($str2, $convmap, "UTF-8")."\n";
  echo mb_decode_numericentity($str3, $convmap, "UTF-8")."\n";
  
+ echo mb_decode_numericentity('&#1000000000', $convmap), "\n";
+ echo mb_decode_numericentity('&#10000000000', $convmap), "\n";
+ echo mb_decode_numericentity('&#100000000000', $convmap), "\n";
 +$convmap = [];
 +echo mb_decode_numericentity('f&ouml;o', $convmap, "UTF-8")."\n";
 +
 +$convmap = array(0x0, 0x2FFFF, 0); // 3 elements
 +try {
 +    echo mb_decode_numericentity($str3, $convmap, "UTF-8")."\n";
 +} catch (ValueError $ex) {
 +    echo $ex->getMessage()."\n";
 +}
++
  ?>
  --EXPECT--
  ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
  ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦
  aŒbœcŠdše€fg
+ &#1000000000
+ &#10000000000
+ &#100000000000
 +f&ouml;o
 +count($convmap) must be a multiple of 4