From: Moriyoshi Koizumi Date: Mon, 18 Nov 2002 21:20:45 +0000 (+0000) Subject: We have to use binary mode here. X-Git-Tag: RELEASE_1_0b2~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b75f2df3d433d9d4fb795a1ce131d54aebeef3f6;p=php We have to use binary mode here. --- diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c index f37eb4726c..a370839a66 100644 --- a/ext/mime_magic/mime_magic.c +++ b/ext/mime_magic/mime_magic.c @@ -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. */