1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/phar: use size_t type instead of int

This commit is contained in:
Gina Peter Banyard
2025-10-13 14:24:51 +01:00
parent e6e39e680e
commit d36109bd71
3 changed files with 4 additions and 2 deletions

2
NEWS
View File

@@ -37,6 +37,8 @@ PHP NEWS
. Fix file descriptor/memory leak when opening central fp fails. (nielsdos)
. Fix memleak+UAF when opening temp stream in buildFromDirectory() fails.
(nielsdos)
. Fix potential buffer length truncation due to usage of type int instead
of type size_t. (Girgias)
- Random:
. Fix Randomizer::__serialize() w.r.t. INDIRECTs. (nielsdos)

View File

@@ -1590,7 +1590,7 @@ int phar_open_from_filename(char *fname, size_t fname_len, char *alias, size_t a
}
/* }}}*/
static inline char *phar_strnstr(const char *buf, int buf_len, const char *search, int search_len) /* {{{ */
static inline char *phar_strnstr(const char *buf, size_t buf_len, const char *search, size_t search_len) /* {{{ */
{
const char *c;
ptrdiff_t so_far = 0;

View File

@@ -673,7 +673,7 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, const char *url, int
{
php_url *resource;
char *internal_file, *error;
int internal_file_len;
size_t internal_file_len;
phar_entry_data *idata;
phar_archive_data *pphar;
uint32_t host_len;