From 472ab3b05f3dca9ea0904b39e705b92e74853f19 Mon Sep 17 00:00:00 2001 From: David Levine Date: Wed, 21 May 2014 20:50:22 -0500 Subject: [PATCH] On platforms with no MIMETYPEPROC, declare the content to be binary if it contains any NUL characters. --- sbr/mime_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.56.0