X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/71458b3b2492943349f7693a46792756d5013c69..cdf50a1f967873cf4606e10b9977ab18b80ee70d:/sbr/mime_type.c diff --git a/sbr/mime_type.c b/sbr/mime_type.c index be791096..06a6156d 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; } @@ -128,7 +128,6 @@ get_file_info(const char *proc, const char *file_name) { } } - cmd = concat(proc, " ", quotec, file_name, quotec, NULL); if ((cmd = concat(proc, " ", quotec, file_name, quotec, NULL))) { FILE *fp;