php-src/ext/standard/tests
Wez Furlong d8fbd1acef Fix Bug #21523 - number_format could cause a memory allocation for a
negative memory size in situations where the sprintf implementation of the
host system generated less decimal places than were requested.

Resolved this issue by making number_format examine the string returned
by spprintf and have it pad to the correct number of decimal places.

Added a test-case based on the bug report; the length of decimal places
required to trigger this bug is sprintf implementation dependent; as the
implementation is now using spprintf (provided by PHP), that number is
78 digits (NDIG - 2).

# I played with the idea of enhancing sprintf to do the equivalent, but
# it was too much effort considering that the precision of floats/doubles
# is not good enough to warrant it.

# This fix could do with some QA from someone else to make sure there are
# no memory bounds problems and then MFH it to PHP_4_3
2003-01-09 15:44:49 +00:00
..
aggregation - Skip if the function is not available (in case pcre was not compiled in). 2002-10-08 09:46:31 +00:00
array - Add test for bug #21182 2002-12-25 20:08:36 +00:00
assert Made assert test pass on systems with short open tags disabled. 2001-10-06 09:38:29 +00:00
file Make it slightly more obvious that the return value is relative to the length 2003-01-06 14:04:23 +00:00
general_functions Added getopt() test. 2002-12-11 17:38:28 +00:00
image -Added colordepth for png 2002-11-18 16:51:02 +00:00
math Fix Bug #21523 - number_format could cause a memory allocation for a 2003-01-09 15:44:49 +00:00
network Add a test case for this "bug" # 20134. 2002-11-14 14:56:35 +00:00
reg * all tests should pass now (expect for the interbase stuff that I haven't 2000-08-31 22:21:47 +00:00
serialize Made unserialize handle floats with an E notation - bug #18654 2002-08-19 19:45:46 +00:00
strings Fixed bug #21453 (improper handling of non-terminated <). 2003-01-06 22:13:03 +00:00
time Only show the first results 2002-11-15 14:46:52 +00:00
versioning * remove version_{lt,le,gt,ge,eq} functions, added a third optional 2001-10-11 10:35:59 +00:00