From: Christos Zoulas Date: Wed, 16 Sep 2015 22:52:54 +0000 (+0000) Subject: drop the count of digits allowed. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dec0e8ae5811ae480d54be179fbc742e3a610b1d;p=file drop the count of digits allowed. --- diff --git a/src/apprentice.c b/src/apprentice.c index 2089e63a..cbb05898 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.240 2015/09/16 18:34:21 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.241 2015/09/16 22:52:54 christos Exp $") #endif /* lint */ #include "magic.h" @@ -2348,7 +2348,7 @@ check_format_type(const char *ptr, int type, const char **estr) #define CHECKLEN() do { \ for (len = cnt = 0; isdigit((unsigned char)*ptr); ptr++, cnt++) \ len = len * 10 + (*ptr - '0'); \ - if (cnt > 10 || len > 1024) \ + if (cnt > 5 || len > 1024) \ goto toolong; \ } while (/*CONSTCOND*/0)