From 2d183dcc1d76397de8fe29b4d880062b0b91087d Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Sat, 9 May 2009 20:34:37 +0000 Subject: [PATCH] MFH Update bundled libmagic to 5.03 --- ext/fileinfo/libmagic/patchlevel.h | 5 ++++- ext/fileinfo/libmagic/readcdf.c | 13 +++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ext/fileinfo/libmagic/patchlevel.h b/ext/fileinfo/libmagic/patchlevel.h index 5893229f40..12e685af8f 100644 --- a/ext/fileinfo/libmagic/patchlevel.h +++ b/ext/fileinfo/libmagic/patchlevel.h @@ -1,11 +1,14 @@ #define FILE_VERSION_MAJOR 5 -#define patchlevel 2 +#define patchlevel 3 /* * Patchlevel file for Ian Darwin's MAGIC command. * $File: patchlevel.h,v 1.68 2008/03/22 21:39:43 christos Exp $ * * $Log$ + * Revision 1.1.2.3 2009/05/04 20:54:53 scottmac + * MFH Update libmagic to 5.02 + * * Revision 1.1.2.2 2009/03/15 23:04:18 scottmac * MFH Update fileinfo to libmagic 5.00 and remove dependency on dirent.h on Windows * diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c index fd7a8eb936..20462f3286 100644 --- a/ext/fileinfo/libmagic/readcdf.c +++ b/ext/fileinfo/libmagic/readcdf.c @@ -157,15 +157,8 @@ cdf_file_summary_info(struct magic_set *ms, const cdf_stream_t *sst) size_t count; int m; - if (cdf_unpack_summary_info(sst, &si, &info, &count) == -1) { - if (si.si_byte_order != 0xfffe) - return 0; - else - return -1; - } - - if (si.si_byte_order != 0xfffe) - return 0; + if (cdf_unpack_summary_info(sst, &si, &info, &count) == -1) + return -1; if (NOTMIME(ms)) { if (file_printf(ms, "CDF V2 Document") == -1) @@ -257,7 +250,7 @@ file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf, if ((i = cdf_read_summary_info(&info, &h, &sat, &ssat, &sst, &dir, &scn)) == -1) { - expn = ""; + expn = "Cannot read summary info"; goto out4; } #ifdef CDF_DEBUG -- 2.50.1