mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
fix build on windows, fix segfault in tsrm by uninitialized pointer
This commit is contained in:
parent
fe0b683b21
commit
63f3d5958d
3 changed files with 4 additions and 3 deletions
|
@ -20,6 +20,6 @@ $(builddir)/phar.phar: $(builddir)/phar.php $(srcdir)/phar/*.inc $(srcdir)/phar/
|
||||||
export PHP="$(top_builddir)/$(SAPI_CLI_PATH)"; \
|
export PHP="$(top_builddir)/$(SAPI_CLI_PATH)"; \
|
||||||
export BANG="$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)"; \
|
export BANG="$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)"; \
|
||||||
fi; \
|
fi; \
|
||||||
$$PHP -d phar.readonly=0 $(srcdir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x CVS -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b "$$BANG" $(srcdir)/phar/
|
$$PHP -d phar.readonly=0 $(srcdir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c bz2 -x CVS -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b "$$BANG" $(srcdir)/phar/
|
||||||
@chmod +x $(builddir)/phar.phar
|
@chmod +x $(builddir)/phar.phar
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -339,7 +339,7 @@ static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC)
|
||||||
case IS_STRING :
|
case IS_STRING :
|
||||||
break;
|
break;
|
||||||
case IS_OBJECT :
|
case IS_OBJECT :
|
||||||
if (instanceof_function(Z_OBJCE_PP(value), spl_ce_SplFileInfo)) {
|
if (instanceof_function(Z_OBJCE_PP(value), spl_ce_SplFileInfo TSRMLS_CC)) {
|
||||||
char *test;
|
char *test;
|
||||||
zval dummy;
|
zval dummy;
|
||||||
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(*value TSRMLS_CC);
|
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(*value TSRMLS_CC);
|
||||||
|
@ -357,6 +357,7 @@ static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC)
|
||||||
efree(fname);
|
efree(fname);
|
||||||
return ZEND_HASH_APPLY_KEEP;
|
return ZEND_HASH_APPLY_KEEP;
|
||||||
}
|
}
|
||||||
|
test = NULL;
|
||||||
test = expand_filepath(fname, test TSRMLS_CC);
|
test = expand_filepath(fname, test TSRMLS_CC);
|
||||||
if (test) {
|
if (test) {
|
||||||
efree(fname);
|
efree(fname);
|
||||||
|
@ -512,7 +513,7 @@ PHP_METHOD(Phar, buildFromIterator)
|
||||||
pass.l = base_len;
|
pass.l = base_len;
|
||||||
pass.ret = return_value;
|
pass.ret = return_value;
|
||||||
|
|
||||||
if (SUCCESS == spl_iterator_apply(obj, (spl_iterator_apply_func_t) phar_build, (void *) &pass)) {
|
if (SUCCESS == spl_iterator_apply(obj, (spl_iterator_apply_func_t) phar_build, (void *) &pass TSRMLS_CC)) {
|
||||||
phar_flush(phar_obj->arc.archive, 0, 0, &error TSRMLS_CC);
|
phar_flush(phar_obj->arc.archive, 0, 0, &error TSRMLS_CC);
|
||||||
if (error) {
|
if (error) {
|
||||||
zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, error);
|
zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue