Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2025 The PHP Group. All rights reserved.
Copyright (c) 1999 - 2026 The PHP Group. All rights reserved.
--------------------------------------------------------------------

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ext/calendar/jewish.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ zend_long JewishToSdn(
int yearLength;
int lengthOfAdarIAndII;

if (year <= 0 || year >= 6000 || day <= 0 || day > 30) {
if (year <= 0 || year >= INT_MAX - 1 || day <= 0 || day > 30) {
return (0);
}
switch (month) {
Expand Down
24 changes: 24 additions & 0 deletions ext/calendar/tests/gh21557.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--TEST--
GH-21557 jewishtojd returns 0 for years >= 6000
--CREDITS--
oleibman
--EXTENSIONS--
calendar
--FILE--
<?php
for ($yh = 5995; $yh < 6005; ++$yh) {
$rh = jewishtojd(1, 1, $yh);
echo "yh=$yh rh=$rh\n";
}
?>
--EXPECT--
yh=5995 rh=2537279
yh=5996 rh=2537633
yh=5997 rh=2538016
yh=5998 rh=2538371
yh=5999 rh=2538725
yh=6000 rh=2539110
yh=6001 rh=2539463
yh=6002 rh=2539818
yh=6003 rh=2540202
yh=6004 rh=2540557
4 changes: 2 additions & 2 deletions ext/standard/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ zend_string *php_base64_encode_avx512_vbmi(const unsigned char *str, size_t leng
/* Step 2: splitting 24-bit words into 32-bit lanes */
str = _mm512_permutexvar_epi8(shuffle_splitting, str);

/* Step 3: moving 6-bit word to sperate bytes */
/* Step 3: moving 6-bit word to separate bytes */
str = _mm512_multishift_epi64_epi8(multi_shifts, str);

/* Step 4: conversion to ASCII */
Expand Down Expand Up @@ -643,7 +643,7 @@ zend_string *php_base64_encode_avx512(const unsigned char *str, size_t length, z
/* [D1 D2 D0 D1|C1 C2 C0 C1|B1 B2 B0 B1|A1 A2 A0 A1] x 4 */
str = _mm512_shuffle_epi8(str, _mm512_set4_epi32(0x0a0b090a, 0x07080607, 0x04050304, 0x01020001));

/* Step 3: moving 6-bit word to sperate bytes */
/* Step 3: moving 6-bit word to separate bytes */
/* in: [bbbbcccc|ccdddddd|aaaaaabb|bbbbcccc] */
/* t0: [0000cccc|cc000000|aaaaaa00|00000000] */
const __m512i t0 = _mm512_and_si512(str, _mm512_set1_epi32(0x0fc0fc00));
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/metaphone.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static zend_always_inline char encode(char c) {
/*----------------------------- */

/* I suppose I could have been using a character pointer instead of
* accesssing the array directly... */
* accessing the array directly... */

#define Convert_Raw(c) toupper(c)
/* Look at the next letter in the word */
Expand Down Expand Up @@ -264,7 +264,7 @@ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonem
for (; (curr_letter = Read_Raw_Curr_Letter) != '\0' &&
(max_phonemes == 0 || Phone_Len < (size_t)max_phonemes);
w_idx++) {
/* How many letters to skip because an eariler encoding handled
/* How many letters to skip because an earlier encoding handled
* multiple letters */
unsigned short int skip_letter = 0;

Expand Down
2 changes: 1 addition & 1 deletion ext/standard/var.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_
&& Z_OBJ_HT_P(struc)->get_properties_for == NULL
&& Z_OBJ_HT_P(struc)->get_properties == zend_std_get_properties
&& !zend_object_is_lazy(Z_OBJ_P(struc))) {
/* Optimized version without rebulding properties HashTable */
/* Optimized version without rebuilding properties HashTable */
zend_object *obj = Z_OBJ_P(struc);
zend_class_entry *ce = obj->ce;
zend_property_info *prop_info;
Expand Down