diff options
author | Christos Zoulas <christos@zoulas.com> | 2016-10-18 16:10:07 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2016-10-18 16:10:07 +0000 |
commit | f0aca10faf16407b97b72b63091ef0d0ea86c1e8 (patch) | |
tree | d3223873c20962ddaad76059c2fa10db43da0913 | |
parent | b2f8473874e3396d0db231936929706b2e834d9a (diff) | |
download | file-git-f0aca10faf16407b97b72b63091ef0d0ea86c1e8.tar.gz |
instead of requiring all the sections to be present, require only one of them.
-rw-r--r-- | src/readcdf.c | 12 |
1 files changed, 5 insertions, 7 deletions
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 <assert.h> @@ -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) |