summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-06-15 18:48:33 +0000
committerPierre Joye <pajoye@php.net>2010-06-15 18:48:33 +0000
commit2cfb5e4254ec3f4a198dd8984ce4e2c1b74310ca (patch)
treeacd595ac4b723e8d4ffcc06c145c8acdf02ff180 /ext/zip/php_zip.c
parent33ac0d0e338e09907c708d1469a631d3881c67d5 (diff)
downloadphp-git-2cfb5e4254ec3f4a198dd8984ce4e2c1b74310ca.tar.gz
- Fix #51002, fix possible memory corruption with very long names
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r--ext/zip/php_zip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 01a8925577..293e95f71a 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -280,8 +280,8 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil
}
/* }}} */
-static int php_zip_add_file(struct zip *za, const char *filename, int filename_len,
- char *entry_name, int entry_name_len, long offset_start, long offset_len TSRMLS_DC) /* {{{ */
+static int php_zip_add_file(struct zip *za, const char *filename, size_t filename_len,
+ char *entry_name, size_t entry_name_len, long offset_start, long offset_len TSRMLS_DC) /* {{{ */
{
struct zip_source *zs;
int cur_idx;
@@ -1629,7 +1629,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
for (i = 0; i < found; i++) {
char *file, *file_stripped, *entry_name;
- int entry_name_len,file_stripped_len;
+ size_t entry_name_len, file_stripped_len;
char entry_name_buf[MAXPATHLEN];
char *basename = NULL;