From: Christos Zoulas Date: Tue, 18 Oct 2016 16:10:07 +0000 (+0000) Subject: instead of requiring all the sections to be present, require only one of them. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0aca10faf16407b97b72b63091ef0d0ea86c1e8;p=file instead of requiring all the sections to be present, require only one of them. --- diff --git a/src/readcdf.c b/src/readcdf.c index 1b105d06..483e1d80 100644 --- a/src/readcdf.c +++ b/src/readcdf.c @@ -26,7 +26,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: readcdf.c,v 1.61 2016/10/17 23:04:27 christos Exp $") +FILE_RCSID("@(#)$File: readcdf.c,v 1.62 2016/10/18 16:10:07 christos Exp $") #endif #include @@ -514,15 +514,13 @@ cdf_file_dir_info(struct magic_set *ms, const cdf_dir_t *dir) const struct sinfo *si = §ioninfo[sd]; for (j = 0; si->sections[j]; j++) { if (cdf_find_stream(dir, si->sections[j], si->types[j]) - <= 0) { + > 0) + break; #ifdef CDF_DEBUG - fprintf(stderr, "Can't read %s\n", - si->sections[j]); + fprintf(stderr, "Can't read %s\n", si->sections[j]); #endif - break; - } } - if (si->sections[j] != NULL) + if (si->sections[j] == NULL) continue; if (NOTMIME(ms)) { if (file_printf(ms, "CDFV2 %s", si->name) == -1)