From: Christos Zoulas Date: Thu, 6 Mar 2014 16:18:53 +0000 (+0000) Subject: sign police. X-Git-Tag: FILE5_18~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1909de2907ab4f9b0e27ba5ee4d8fd54b86d2013;p=file sign police. --- diff --git a/src/apprentice.c b/src/apprentice.c index 78283820..e1869b23 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.196 2013/11/19 21:01:12 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.197 2014/03/06 16:16:56 christos Exp $") #endif /* lint */ #include "magic.h" @@ -2608,9 +2608,9 @@ apprentice_map(struct magic_set *ms, const char *fn) file_error(ms, errno, "cannot stat `%s'", dbname); goto error; } - if (st.st_size < 8 || st.st_size > SIZE_MAX) { + if (st.st_size < 8 || st.st_size > (off_t)SIZE_MAX) { file_error(ms, 0, "file `%s' is too %s", dbname, - st.st_size > SIZE_MAX ? "large" : "small"); + st.st_size < 8 ? "small" : "large"); goto error; }