]> granicus.if.org Git - php/commitdiff
MFH: fix #35690 (pack() tries to allocate huge memory block when packing float values...
authorAntony Dovgal <tony2001@php.net>
Thu, 15 Dec 2005 22:15:01 +0000 (22:15 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 15 Dec 2005 22:15:01 +0000 (22:15 +0000)
NEWS
ext/standard/pack.c

diff --git a/NEWS b/NEWS
index 58434a9feac0a02c908ce3466c49969fa80ef3ec..8d1c34513524ae7795127a50c4bd606d4f427cd6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,8 @@ PHP                                                                        NEWS
 - Fixed many bugs in OCI8. (Tony)
 - Fixed crash and leak in mysqli when using 4.1.x client libraries and
   connecting to 5.x server. (Andrey)
+- Fixed bug #35690 (pack() tries to allocate huge memory block when packing 
+  float values to strings). (Tony)
 - Fixed bug #35655 (whitespace following end of heredoc is lost). (Ilia)
 - Fixed bug #35630 (strtotime() crashes on certain relative identifiers).
   (Ilia)
index 80ef259356bf76f63b171b5b49dde81b3d15611f..4b9ac0279809bbebac8cdbc4a3c91d0794f29bb8 100644 (file)
@@ -184,6 +184,7 @@ PHP_FUNCTION(pack)
                                }
 
                                if (arg < 0) {
+                                       convert_to_string_ex(argv[currentarg]);
                                        arg = Z_STRLEN_PP(argv[currentarg]);
                                }