From 1052fe4c3be8a62dbef6ba0054908b0de48ab2d9 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 16 Sep 2015 22:52:54 +0000 Subject: [PATCH] drop the count of digits allowed. --- src/apprentice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apprentice.c b/src/apprentice.c index 98a422da..88c27952 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.239 2015/09/16 18:21:26 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.240 2015/09/16 18:34:21 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) -- 2.50.1