From: David Levine Date: Thu, 22 May 2014 01:50:22 +0000 (-0500) Subject: On platforms with no MIMETYPEPROC, declare the content to be X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/472ab3b05f3dca9ea0904b39e705b92e74853f19?ds=sidebyside;hp=-c On platforms with no MIMETYPEPROC, declare the content to be binary if it contains any NUL characters. --- 472ab3b05f3dca9ea0904b39e705b92e74853f19 diff --git a/sbr/mime_type.c b/sbr/mime_type.c index be791096..673642d5 100644 --- a/sbr/mime_type.c +++ b/sbr/mime_type.c @@ -91,7 +91,7 @@ mime_type(const char *file_name) { } while ((c = getc(fp)) != EOF) { - if (! isascii(c)) { + if (! isascii(c) || c == 0) { binary = 1; break; }