[File] [PATCH] Fix setting MAGIC_PARAM_REGEX_MAX
Vsevolod Stakhov
vsevolod at rspamd.com
Tue Dec 11 11:20:07 UTC 2018
Hello,
This patch fixes setting the MAGIC_PARAM_REGEX_MAX parameter.
-------------- next part --------------
diff --git a/src/magic.c b/src/magic.c
index fd3c1c29..24a6eaa0 100644
--- a/src/magic.c
+++ b/src/magic.c
@@ -604,7 +604,7 @@ magic_setparam(struct magic_set *ms, int param, const void *val)
ms->elf_notes_max = (uint16_t)*(const size_t *)val;
return 0;
case MAGIC_PARAM_REGEX_MAX:
- ms->regex_max = (uint16_t)*(const size_t *)val;
+ ms->regex_max = *(const size_t *)val;
return 0;
case MAGIC_PARAM_BYTES_MAX:
ms->bytes_max = *(const size_t *)val;
More information about the File
mailing list