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

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]);
                                }