summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/streams/plain_wrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index ffaeb31bd9..008e283367 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -899,8 +899,8 @@ static php_stream *php_plain_files_stream_opener(php_stream_wrapper *wrapper, ch
static int php_plain_files_url_stater(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC)
{
- if (strncmp(url, "file://", 7) == 0) {
- url += 7;
+ if (strncmp(url, "file://", sizeof("file://") - 1) == 0) {
+ url += sizeof("file://") - 1;
}
if (PG(safe_mode) &&(!php_checkuid_ex(url, NULL, CHECKUID_CHECK_FILE_AND_DIR, (flags & PHP_STREAM_URL_STAT_QUIET) ? CHECKUID_NO_ERRORS : 0))) {