From: Nuno Lopes Date: Sat, 16 Sep 2006 17:42:44 +0000 (+0000) Subject: MFB X-Git-Tag: RELEASE_1_0_0RC1~1651 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37a08a329c350511d4738402a626cd5ca9b38c59;p=php MFB --- diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 9f85fa60ad..1955c1d072 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -766,6 +766,10 @@ PHP_FUNCTION(posix_access) } path = expand_filepath(filename, NULL TSRMLS_CC); + if (!path) { + POSIX_G(last_error) = EIO; + RETURN_FALSE; + } if (php_check_open_basedir_ex(path, 0 TSRMLS_CC)) { efree(path); diff --git a/ext/posix/tests/001.phpt b/ext/posix/tests/001.phpt new file mode 100644 index 0000000000..e6c629ce63 --- /dev/null +++ b/ext/posix/tests/001.phpt @@ -0,0 +1,12 @@ +--TEST-- +posix_access() with bogus paths +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(false)