]> granicus.if.org Git - php/commitdiff
We have to use binary mode here.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 18 Nov 2002 21:20:45 +0000 (21:20 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 18 Nov 2002 21:20:45 +0000 (21:20 +0000)
ext/mime_magic/mime_magic.c

index f37eb4726cd90af9b8541f59aa6040cac6da274f..a370839a6632fec9e7cd00502db7a105ca2e898c 100644 (file)
@@ -982,7 +982,7 @@ static int magic_process(char *filename TSRMLS_DC)
                return result;
     }
 
-    stream = php_stream_open_wrapper(filename, "r", IGNORE_PATH | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
+    stream = php_stream_open_wrapper(filename, "rb", IGNORE_PATH | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
 
     if (stream == NULL) {
                /* We can't open it, but we were able to stat it. */