summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-12-15 22:15:01 +0000
committerAntony Dovgal <tony2001@php.net>2005-12-15 22:15:01 +0000
commita91f9fb7865dfca2f7735e9332f2efc35431b61e (patch)
tree6878a92220d5e03acfd85e679ad8121e4afe2a6e
parent9417c070f67de92b723ed3545b92fcff370fa45a (diff)
downloadphp-git-a91f9fb7865dfca2f7735e9332f2efc35431b61e.tar.gz
MFH: fix #35690 (pack() tries to allocate huge memory block when packing float values to strings)
-rw-r--r--NEWS2
-rw-r--r--ext/standard/pack.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 58434a9fea..8d1c345135 100644
--- 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)
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 80ef259356..4b9ac02798 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -184,6 +184,7 @@ PHP_FUNCTION(pack)
}
if (arg < 0) {
+ convert_to_string_ex(argv[currentarg]);
arg = Z_STRLEN_PP(argv[currentarg]);
}