Skip to content

Commit 2bdc745

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: ext/phar: use size_t type instead of int
2 parents c31c697 + 2c51420 commit 2bdc745

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ PHP NEWS
2323
. Fixed bug GH-19994 (openssl_get_cipher_methods inconsistent with fetching).
2424
(Jakub Zelenka)
2525

26+
- Phar:
27+
. Fix potential buffer length truncation due to usage of type int instead
28+
of type size_t. (Girgias)
29+
2630
- SPL:
2731
. Fixed bug GH-20101 (SplHeap/SplPriorityQueue serialization
2832
exposes INDIRECTs). (nielsdos)

ext/phar/phar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ zend_result phar_open_from_filename(char *fname, size_t fname_len, char *alias,
16001600
}
16011601
/* }}}*/
16021602

1603-
static inline char *phar_strnstr(const char *buf, int buf_len, const char *search, int search_len) /* {{{ */
1603+
static inline char *phar_strnstr(const char *buf, size_t buf_len, const char *search, size_t search_len) /* {{{ */
16041604
{
16051605
const char *c;
16061606
ptrdiff_t so_far = 0;

ext/phar/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, const char *url, int
665665
{
666666
php_url *resource;
667667
char *internal_file, *error;
668-
int internal_file_len;
668+
size_t internal_file_len;
669669
phar_entry_data *idata;
670670
phar_archive_data *pphar;
671671

0 commit comments

Comments
 (0)