diff options
author | Dmitry Stogov <dmitry@zend.com> | 2016-06-23 12:47:06 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2016-06-23 12:47:06 +0300 |
commit | adc95c511495f00cd1a90feff5fff7968e38fc4a (patch) | |
tree | 594019d7d287296c8bd12b47ff41e889f84aa7f9 /ext/phar/phar.c | |
parent | 4ac29543d6e70d6914e85d36f9b50e18968ebea6 (diff) | |
download | php-git-adc95c511495f00cd1a90feff5fff7968e38fc4a.tar.gz |
Fixed compilation warnings
Diffstat (limited to 'ext/phar/phar.c')
-rw-r--r-- | ext/phar/phar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 66da7c81c9..81596423ff 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1030,7 +1030,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char PHAR_GET_32(buffer, len); } } - if(len > endbuffer - buffer) { + if(len > (size_t)(endbuffer - buffer)) { MAPPHAR_FAIL("internal corruption of phar \"%s\" (trying to read past buffer end)"); } if (phar_parse_metadata(&buffer, &mydata->metadata, len) == FAILURE) { @@ -1071,7 +1071,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char entry.manifest_pos = manifest_index; } - if (entry.filename_len + 20 > endbuffer - buffer) { + if (entry.filename_len + 20 > (size_t)(endbuffer - buffer)) { MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest entry)"); } @@ -1113,7 +1113,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char } else { entry.metadata_len = 0; } - if (len > endbuffer - buffer) { + if (len > (size_t)(endbuffer - buffer)) { pefree(entry.filename, entry.is_persistent); MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest entry)"); } |