Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
12c1f1c
ext/calendar: Fix integer overflow in GregorianToSdn() and JulianToJd…
arshidkv12 Jul 7, 2026
f0f26c7
Merge branch 'PHP-8.4' into PHP-8.5
LamentXU123 Jul 7, 2026
ad48d1c
Merge branch 'PHP-8.5'
LamentXU123 Jul 7, 2026
dd86a8a
Implement `ReflectionClass::isAnonymous()` using `_class_check_flag()`
DanielEScherzer Jul 2, 2026
ed27dbc
Reflection: use `RETURN_BOOL` in `_class_check_flag()`
DanielEScherzer Jul 3, 2026
f98ebbf
Implement `ReflectionClassConstant::isEnumCase()` using existing helper
DanielEScherzer Jul 2, 2026
22f80dc
Implement `ReflectionClassConstant::isDeprecated()` using existing he…
DanielEScherzer Jul 2, 2026
0a858ea
Fix inline documentation of `ReflectionProperty::getName()`
DanielEScherzer Jul 2, 2026
36a602b
Update inline documentation of `ReflectionProperty::setAccessible()`
DanielEScherzer Jul 2, 2026
ff39477
Fix inline documentation of `Reflection*::getModifiers()` methods
DanielEScherzer Jul 2, 2026
4795c51
Fix inline documentation of `ReflectionType::allowsNull()`
DanielEScherzer Jul 2, 2026
5dfab10
Fix inline documentation of `ReflectionMethod::getClosure()`
DanielEScherzer Jul 2, 2026
6a19160
Avoid unnecessary concatenation in `zend_named_reflection_type_to_str…
DanielEScherzer Jul 2, 2026
f44ae1b
Reflection: use `true` and `false` for booleans rather than `0`/`1`
DanielEScherzer Jul 2, 2026
4f8f798
Reflection: convert some integers used for conditions to booleans
DanielEScherzer Jul 2, 2026
5370fc8
Reflection: remove unneeded indentation support from `_extension_stri…
DanielEScherzer Jul 2, 2026
4427cb4
Reflection: remove unneeded indentation support from `_extension_ini_…
DanielEScherzer Jul 2, 2026
0d680a2
Reflection: remove unneeded indentation support from `_zend_extension…
DanielEScherzer Jul 2, 2026
7eef7c9
Reflection: access common function fields through `zend_function.common`
DanielEScherzer Jul 2, 2026
c89e3df
`ReflectionNamedType::getName()`: inline logic for legacy behavior
DanielEScherzer Jul 2, 2026
09eaaae
`ReflectionFunction::__toString()`: stop accessing `intern->ce`
DanielEScherzer Jul 2, 2026
0465961
`ReflectionFunctionAbstract::getClosureUsedVariables()`: optimize arrays
DanielEScherzer Jul 2, 2026
08c039c
`ReflectionClass::getStaticProperties()`: optimize array initialization
DanielEScherzer Jul 2, 2026
dca2c72
Fix inline documentation of tentative return methods
DanielEScherzer Jul 2, 2026
4ba8651
`ReflectionFunctionAbstract::getClosureCalledClass()`: remove pointer…
DanielEScherzer Jul 2, 2026
9b5f5e7
Reflection: remove `reflection_extension_factory()`, avoid extra lookups
DanielEScherzer Jul 2, 2026
86b0eaa
Reflection: rename `reflection_extension_factory_ex()`
DanielEScherzer Jul 2, 2026
fc6aaf7
Reflection: improve string release in `reflection_property_factory_st…
DanielEScherzer Jul 2, 2026
35f2e88
Simplify `ReflectionProperty::getSettableType()` property handling
DanielEScherzer Jul 2, 2026
e7b1d99
Rename `ReflectionParameter_isDefault.phpt` to reflect actual contents
DanielEScherzer Jul 2, 2026
3b284ed
Update `ReflectionMethod_getClosureThis.phpt` to match actual contents
DanielEScherzer Jul 2, 2026
69f23e7
Fix inline comment in `ReflectionMethod::isConstructor()`
DanielEScherzer Jul 2, 2026
22d2e41
Reflection: minor whitespace cleanup
DanielEScherzer Jul 2, 2026
f6a4702
`ReflectionAttribute::getArguments()`: optimize array initialization
DanielEScherzer Jul 2, 2026
85f2424
`ReflectionClass::get(Reflection)Constants()`: optimize array initial…
DanielEScherzer Jul 2, 2026
2e2b03e
`ReflectionClass::isSubclassOf()`: remove extraneous parentheses
DanielEScherzer Jul 2, 2026
9390b68
Change bless to clean up absolute paths (#22067)
NattyNarwhal Jul 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ PHP NEWS
recurses through zend_call_function, such as a self-attached SPL
iterator). (iliaal)

- Calendar:
. Fixed bug GH-22602 (gregoriantojd() and juliantojd() integer overflow with
INT_MAX year). (arshidkv12)

- DBA:
. Fixed OOB read on malformed length field in dba flatfile handler. (alhudz)

Expand Down
1 change: 1 addition & 0 deletions ext/calendar/gregor.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ zend_long GregorianToSdn(

/* check for invalid dates */
if (inputYear == 0 || inputYear < -4714 ||
inputYear > INT_MAX - 4800 ||
inputMonth <= 0 || inputMonth > 12 ||
inputDay <= 0 || inputDay > 31) {
return (0);
Expand Down
1 change: 1 addition & 0 deletions ext/calendar/julian.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ zend_long JulianToSdn(

/* check for invalid dates */
if (inputYear == 0 || inputYear < -4713 ||
inputYear > INT_MAX - 4800 ||
inputMonth <= 0 || inputMonth > 12 ||
inputDay <= 0 || inputDay > 31) {
return (0);
Expand Down
20 changes: 20 additions & 0 deletions ext/calendar/tests/gh22602.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--TEST--
Bug GH-22602: (gregoriantojd() and juliantojd() integer overflow with INT_MAX year)
--EXTENSIONS--
calendar
--FILE--
<?php
$max = PHP_INT_MAX > 2147483647 ? 2147483647 : PHP_INT_MAX;
$min = PHP_INT_MAX > 2147483647 ? -2147483648 : PHP_INT_MIN;

var_dump(gregoriantojd(5, 5, $max));
var_dump(gregoriantojd(5, 5, $min));
var_dump(juliantojd(5, 5, 2147483647));
var_dump(juliantojd(5, 5, -2147483647));

?>
--EXPECT--
int(0)
int(0)
int(0)
int(0)
Loading