[File] [PATCH] Fix setting MAGIC_PARAM_REGEX_MAX
Vsevolod Stakhov
vsevolod at rspamd.com
Tue Dec 11 23:15:17 UTC 2018
On 11/12/2018 21:11, Christos Zoulas wrote:
> On Dec 11, 8:09pm, vsevolod at rspamd.com (Vsevolod Stakhov) wrote:
> -- Subject: Re: [File] [PATCH] Fix setting MAGIC_PARAM_REGEX_MAX
>
> | Your change looks incorrect I'm afraid. I'd suggest the following one:
> | https://github.com/file/file/compare/master...vstakhov:master
>
> Yes, it is regex_max, not elf_regex_max. Removing the cast though will
> produce warnings.
I might be wrong, but the cast of (size_t) to (uint16_t) for
MAGIC_PARAM_REGEX_MAX does not look right to me. It narrows the values
to 65535 bytes which is likely not intended there.
I haven't seen any warnings when I removed that (uint16_t) explicit cast
on my x86_64 platform. What warnings do you observe there?
More information about the File
mailing list