]> granicus.if.org Git - file/commitdiff
PR/146: Mime output for office files broken.
authorChristos Zoulas <christos@zoulas.com>
Wed, 28 Sep 2011 13:30:10 +0000 (13:30 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 28 Sep 2011 13:30:10 +0000 (13:30 +0000)
src/readcdf.c

index e3f57929f4f3f1e3b9634f3dc3fd0cb80fc3678f..b5b6d3fb7c001cde15105a6e6861335c5a1312c9 100644 (file)
@@ -26,7 +26,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: readcdf.c,v 1.25 2011/02/10 21:35:05 christos Exp $")
+FILE_RCSID("@(#)$File: readcdf.c,v 1.26 2011/08/26 13:38:28 christos Exp $")
 #endif
 
 #include <stdlib.h>
@@ -144,6 +144,8 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
         if (!NOTMIME(ms)) {
                if (str == NULL)
                        return 0;
+                if (file_printf(ms, "application/%s", str) == -1)
+                        return -1;
         }
         return 1;
 }
@@ -292,7 +294,8 @@ out1:
         free(sat.sat_tab);
 out0:
         if (i != 1) {
-                if (file_printf(ms, "Composite Document File V2 Document") == -1)
+                if (file_printf(ms, "Composite Document File V2 Document")
+                   == -1)
                         return -1;
                 if (*expn)
                         if (file_printf(ms, ", %s%s", corrupt, expn) == -1)