diff options
| author | Davey Shafik <me@daveyshafik.com> | 2016-11-30 15:05:54 -0800 |
|---|---|---|
| committer | Davey Shafik <me@daveyshafik.com> | 2016-11-30 15:05:54 -0800 |
| commit | be556555cc4f41798a880fde52920f0b29518fd7 (patch) | |
| tree | 03a75f73c5ea6da5989f4aeca3078fc64ade1020 /sapi/phpdbg | |
| parent | 9efea0c23eb0bd8f92c97cc39954fd3cdb366e8b (diff) | |
| parent | e89a0535a3d8f2a09e3b28c3e70d7181819d6ec5 (diff) | |
| download | php-git-be556555cc4f41798a880fde52920f0b29518fd7.tar.gz | |
Merge branch 'PHP-7.1' into PHP-7.1.0
* PHP-7.1: (64 commits)
Update NEWS for the build
Fixed bug #73586 (php_user_filter::$stream is not set to the stream the filter is working on).
Fixed calling generators through magic __call()
add NEWS
Fix #73549: Use after free when stream is passed to imagepng
Update UPGRADING with info about AEAD changes in openssl_(en|de)crypt
Do not add extra timeval entropy when OpenSSL 1.1 used
Clean up and fix php_openssl_dh_pub_from_priv
Fix occasionaly failing test
Added missing array key to $JUNIT
acinclude.m4: fix krb5-config detection and usage in PHP_SETUP_KERBEROS.
Add more mbfl string size checks (bug #73505)
Add more mbfl string size checks (bug #73505)
Fix #73612: preg_*() may leak memory
Fix more size_t/int implicit conversions
Fix int/size_t confusion in isValidPharFilename (bug #73580)
Fix more size_t/int implicit conversions
Fix #73582: Failing ext/gd/tests/imagettftext_charmap_order.phpt
Fix int/size_t confusion in isValidPharFilename (bug #73580)
add test for bug #57547
...
Diffstat (limited to 'sapi/phpdbg')
| -rw-r--r-- | sapi/phpdbg/phpdbg.c | 3 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg.h | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_io.c | 10 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_sigsafe.c | 4 |
4 files changed, 9 insertions, 10 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 2adca8e2c8..b47c7c82b3 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -29,6 +29,7 @@ #include "zend_alloc.h" #include "phpdbg_eol.h" #include "phpdbg_print.h" +#include "phpdbg_help.h" #include "ext/standard/basic_functions.h" @@ -1957,7 +1958,7 @@ phpdbg_main: if (PHPDBG_G(ops)) { phpdbg_print_opcodes(print_opline_func); } else { - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("No opcodes could be compiled | No file specified or compilation failed?\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("No opcodes could be compiled | No file specified or compilation failed?\n")); } goto phpdbg_out; } diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h index 84041b125c..cf591a8a4e 100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h @@ -116,8 +116,6 @@ #define memcpy(...) memcpy_tmp(__VA_ARGS__) #endif -#define quiet_write(...) ZEND_IGNORE_VALUE(write(__VA_ARGS__)) - #if !defined(PHPDBG_WEBDATA_TRANSFER_H) && !defined(PHPDBG_WEBHELPER_H) #ifdef ZTS diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c index b2f4ba7c0d..65a14d0ccb 100644 --- a/sapi/phpdbg/phpdbg_io.c +++ b/sapi/phpdbg/phpdbg_io.c @@ -149,7 +149,7 @@ recv_once: #endif if (got_now == -1) { - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n")); return -1; } i -= got_now; @@ -203,7 +203,7 @@ static int phpdbg_output_pager(int sock, const char *ptr, int len) { if (memchr(p, '\n', endp - p)) { char buf[PHPDBG_MAX_CMD]; - write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---")); + zend_quiet_write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---")); phpdbg_consume_stdin_line(buf); if (*buf == 'q') { break; @@ -305,7 +305,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short wrote = snprintf(buf, 128, "Could not translate address '%s'", addr); buf[wrote] = '\0'; - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); return sock; } else { @@ -315,7 +315,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short wrote = snprintf(buf, 256, "Host '%s' not found. %s", addr, estrdup(gai_strerror(rc))); buf[wrote] = '\0'; - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); return sock; #ifndef PHP_WIN32 @@ -330,7 +330,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short wrote = sprintf(buf, "Unable to create socket"); buf[wrote] = '\0'; - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); return sock; } diff --git a/sapi/phpdbg/phpdbg_sigsafe.c b/sapi/phpdbg/phpdbg_sigsafe.c index 2f987b3a15..081d864c5c 100644 --- a/sapi/phpdbg/phpdbg_sigsafe.c +++ b/sapi/phpdbg/phpdbg_sigsafe.c @@ -13,13 +13,13 @@ static void* zend_mm_mem_alloc(zend_mm_storage *storage, size_t size, size_t ali return (void *) (((size_t) PHPDBG_G(sigsafe_mem).mem & ~(alignment - 1)) + alignment); } - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Tried to allocate more than " EXP_STR(PHPDBG_SIGSAFE_MEM_SIZE) " bytes from stack memory in signal handler ... bailing out of signal handler\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Tried to allocate more than " EXP_STR(PHPDBG_SIGSAFE_MEM_SIZE) " bytes from stack memory in signal handler ... bailing out of signal handler\n")); if (*EG(bailout)) { LONGJMP(*EG(bailout), FAILURE); } - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Bailed out without a bailout address in signal handler!\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Bailed out without a bailout address in signal handler!\n")); return NULL; } |
