[File] [PATCH] Fix setting MAGIC_PARAM_REGEX_MAX

Vsevolod Stakhov vsevolod at rspamd.com
Tue Dec 11 11:24:01 UTC 2018


On 11/12/2018 11:20, Vsevolod Stakhov wrote:
> Hello,
> 
> This patch fixes setting the MAGIC_PARAM_REGEX_MAX parameter.
> 

Sorry, attached a wrong patch. Here is the correct one.
-------------- next part --------------
diff --git a/src/magic.c b/src/magic.c
index 7f469c59..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->elf_notes_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