From: Sara Golemon Date: Tue, 2 Dec 2003 01:04:14 +0000 (+0000) Subject: CS X-Git-Tag: php-5.0.0b3RC1~432 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbfe62117bd132291432220d24211a0961a4f9cf;p=php CS --- 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))) {