@@ -1290,7 +1290,6 @@ PHP_FUNCTION(zip_entry_read)
12901290 zend_long len = 0 ;
12911291 zip_read_rsrc * zr_rsrc ;
12921292 zend_string * buffer ;
1293- int n = 0 ;
12941293
12951294 if (zend_parse_parameters (ZEND_NUM_ARGS (), "r|l" , & zip_entry , & len ) == FAILURE ) {
12961295 RETURN_THROWS ();
@@ -1306,7 +1305,7 @@ PHP_FUNCTION(zip_entry_read)
13061305
13071306 if (zr_rsrc -> zf ) {
13081307 buffer = zend_string_safe_alloc (1 , len , 0 , 0 );
1309- n = zip_fread (zr_rsrc -> zf , ZSTR_VAL (buffer ), ZSTR_LEN (buffer ));
1308+ zip_int64_t n = zip_fread (zr_rsrc -> zf , ZSTR_VAL (buffer ), ZSTR_LEN (buffer ));
13101309 if (n > 0 ) {
13111310 ZSTR_VAL (buffer )[n ] = '\0' ;
13121311 ZSTR_LEN (buffer ) = n ;
@@ -2868,8 +2867,6 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
28682867 zend_string * filename ;
28692868 zend_string * buffer ;
28702869
2871- int n = 0 ;
2872-
28732870 if (type == 1 ) {
28742871 if (zend_parse_parameters (ZEND_NUM_ARGS (), "P|ll" , & filename , & len , & flags ) == FAILURE ) {
28752872 RETURN_THROWS ();
@@ -2906,7 +2903,7 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
29062903 }
29072904
29082905 buffer = zend_string_safe_alloc (1 , len , 0 , 0 );
2909- n = zip_fread (zf , ZSTR_VAL (buffer ), ZSTR_LEN (buffer ));
2906+ zip_int64_t n = zip_fread (zf , ZSTR_VAL (buffer ), ZSTR_LEN (buffer ));
29102907 if (n < 1 ) {
29112908 zend_string_efree (buffer );
29122909 RETURN_EMPTY_STRING ();
0 commit comments