]> granicus.if.org Git - php/commitdiff
CS
authorSara Golemon <pollita@php.net>
Tue, 2 Dec 2003 01:04:14 +0000 (01:04 +0000)
committerSara Golemon <pollita@php.net>
Tue, 2 Dec 2003 01:04:14 +0000 (01:04 +0000)
main/streams/plain_wrapper.c

index ffaeb31bd92fe6d175e23975917a18bdc66e910a..008e2833677a59bedb94422c45334f14f89d263f 100644 (file)
@@ -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))) {