diff options
author | Christos Zoulas <christos@zoulas.com> | 2022-10-01 21:15:55 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2022-10-01 21:15:55 +0000 |
commit | 83310d1483307cdae924447770311c88dbb29175 (patch) | |
tree | bba18a2e9420e4f78a75fa552fc95bbf8619cc19 /src | |
parent | ba154d74e83a8d83985c0759092ba1bdacd17c45 (diff) | |
download | file-git-83310d1483307cdae924447770311c88dbb29175.tar.gz |
prevent overflow (clusterfuzz)
Diffstat (limited to 'src')
-rw-r--r-- | src/apprentice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/apprentice.c b/src/apprentice.c index d3b53b94..f6719cb5 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.334 2022/09/27 01:58:20 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.335 2022/10/01 21:15:55 christos Exp $") #endif /* lint */ #include "magic.h" @@ -2916,7 +2916,7 @@ getvalue(struct magic_set *ms, struct magic *m, const char **p, int action) } for (q = *p; isspace(CAST(unsigned char, *q)); q++) continue; - if (*q == '-') + if (*q == '-' && ull != UINT64_MAX) ull = -CAST(int64_t, ull); switch (ts) { case 1: |