summaryrefslogtreecommitdiff
path: root/ext/phar/util.c
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2009-04-29 03:24:27 +0000
committerGreg Beaver <cellog@php.net>2009-04-29 03:24:27 +0000
commitf21744809ed2a64321af4998624b5e4887892e5a (patch)
tree42cb136684dda7224fe463893f8156166512530d /ext/phar/util.c
parent13b1607886c7b078e3a769dc207af5f83a53ee49 (diff)
downloadphp-git-f21744809ed2a64321af4998624b5e4887892e5a.tar.gz
MFPECL: fix PECL bug #16338, php_stream_copy_to_stream{,_ex}()
Diffstat (limited to 'ext/phar/util.c')
-rw-r--r--ext/phar/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 6fc6dcab00..2edfe773af 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -896,7 +896,7 @@ int phar_copy_entry_fp(phar_entry_info *source, phar_entry_info *dest, char **er
link = source;
}
- if (link->uncompressed_filesize != php_stream_copy_to_stream(phar_get_efp(link, 0 TSRMLS_CC), dest->fp, link->uncompressed_filesize)) {
+ if (SUCCESS != phar_stream_copy_to_stream(phar_get_efp(link, 0 TSRMLS_CC), dest->fp, link->uncompressed_filesize, NULL)) {
php_stream_close(dest->fp);
dest->fp_type = PHAR_FP;
if (error) {
@@ -997,7 +997,7 @@ int phar_open_entry_fp(phar_entry_info *entry, char **error, int follow_links TS
php_stream_filter_append(&ufp->writefilters, filter);
php_stream_seek(phar_get_entrypfp(entry TSRMLS_CC), phar_get_fp_offset(entry TSRMLS_CC), SEEK_SET);
- if (php_stream_copy_to_stream(phar_get_entrypfp(entry TSRMLS_CC), ufp, entry->compressed_filesize) != entry->compressed_filesize) {
+ if (SUCCESS != phar_stream_copy_to_stream(phar_get_entrypfp(entry TSRMLS_CC), ufp, entry->compressed_filesize, NULL)) {
spprintf(error, 4096, "phar error: internal corruption of phar \"%s\" (actual filesize mismatch on file \"%s\")", phar->fname, entry->filename);
php_stream_filter_remove(filter, 1 TSRMLS_CC);
return FAILURE;
@@ -1134,7 +1134,7 @@ int phar_separate_entry_fp(phar_entry_info *entry, char **error TSRMLS_DC) /* {{
link = entry;
}
- if (link->uncompressed_filesize != php_stream_copy_to_stream(phar_get_efp(link, 0 TSRMLS_CC), fp, link->uncompressed_filesize)) {
+ if (SUCCESS != phar_stream_copy_to_stream(phar_get_efp(link, 0 TSRMLS_CC), fp, link->uncompressed_filesize, NULL)) {
if (error) {
spprintf(error, 4096, "phar error: cannot separate entry file \"%s\" contents in phar archive \"%s\" for write access", entry->filename, entry->phar->fname);
}