diff options
Diffstat (limited to 'ext/standard')
| -rw-r--r-- | ext/standard/dns.c | 2 | ||||
| -rw-r--r-- | ext/standard/streamsfuncs.c | 2 | ||||
| -rw-r--r-- | ext/standard/tests/file/bug24482.phpt | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 7bf7ccac85..8e24a817ff 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -514,7 +514,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int tp[dlen] = '\0'; cp += dlen; - add_assoc_stringl(*subarray, "txt", tp, dlen - 1, 0); + add_assoc_stringl(*subarray, "txt", tp, (dlen>0)?dlen - 1:0, 0); add_assoc_zval(*subarray, "entries", entries); } break; diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 4a86007e85..27042f6e5d 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -51,7 +51,7 @@ PHP_FUNCTION(stream_socket_pair) { long domain, type, protocol; php_stream *s1, *s2; - int pair[2]; + php_socket_t pair[2]; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &domain, &type, &protocol)) { diff --git a/ext/standard/tests/file/bug24482.phpt b/ext/standard/tests/file/bug24482.phpt index f545f1addf..9d0568af33 100644 --- a/ext/standard/tests/file/bug24482.phpt +++ b/ext/standard/tests/file/bug24482.phpt @@ -8,6 +8,11 @@ if (!function_exists("glob")) { ?> --FILE-- <?php + +// run this test in ext/standard/tests (see bug #64714) +chdir(__DIR__); // ensure in ext/standard/tests/file +chdir('..'); // move up to ext/standard/tests + $globdirs = glob("*", GLOB_ONLYDIR); $dirs = array(); |
