Skip to content

Commit 2c51420

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: ext/phar: use size_t type instead of int
2 parents 191430d + d36109b commit 2c51420

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ PHP NEWS
3939
. Fix file descriptor/memory leak when opening central fp fails. (nielsdos)
4040
. Fix memleak+UAF when opening temp stream in buildFromDirectory() fails.
4141
(nielsdos)
42+
. Fix potential buffer length truncation due to usage of type int instead
43+
of type size_t. (Girgias)
4244

4345
- Random:
4446
. Fix Randomizer::__serialize() w.r.t. INDIRECTs. (nielsdos)

ext/phar/phar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ zend_result phar_open_from_filename(char *fname, size_t fname_len, char *alias,
15921592
}
15931593
/* }}}*/
15941594

1595-
static inline char *phar_strnstr(const char *buf, int buf_len, const char *search, int search_len) /* {{{ */
1595+
static inline char *phar_strnstr(const char *buf, size_t buf_len, const char *search, size_t search_len) /* {{{ */
15961596
{
15971597
const char *c;
15981598
ptrdiff_t so_far = 0;

ext/phar/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, const char *url, int
670670
{
671671
php_url *resource;
672672
char *internal_file, *error;
673-
int internal_file_len;
673+
size_t internal_file_len;
674674
phar_entry_data *idata;
675675
phar_archive_data *pphar;
676676

0 commit comments

Comments
 (0)