diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-27 14:56:16 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-27 14:57:13 +0100 |
commit | 081b07dd25700f826cd779b0cb808c07030be890 (patch) | |
tree | ae625af33a9676eb9d02fec38b8e377ec2af76c2 /src/libutil/str_util.c | |
parent | 89bc0d59ce7383be74ed0747d9c3215ba2fb5546 (diff) | |
download | rspamd-081b07dd25700f826cd779b0cb808c07030be890.tar.gz rspamd-081b07dd25700f826cd779b0cb808c07030be890.zip |
[Fix] Fix substring search when there are '\0' in strings
Diffstat (limited to 'src/libutil/str_util.c')
-rw-r--r-- | src/libutil/str_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index a25dc32d5..67aa63aa8 100644 --- a/src/libutil/str_util.c +++ b/src/libutil/str_util.c @@ -1237,7 +1237,7 @@ rspamd_substring_search_caseless (const gchar *in, gsize inlen, j = 0; while (j <= inlen - srchlen) { - if (hash_srch == hash_in && g_ascii_strncasecmp (srch, in + j, srchlen) == 0) { + if (hash_srch == hash_in && rspamd_lc_cmp (srch, in + j, srchlen) == 0) { return (goffset) j; } |