]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix substring search when there are '\0' in strings
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 27 May 2016 13:56:16 +0000 (14:56 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 27 May 2016 13:57:13 +0000 (14:57 +0100)
src/libutil/str_util.c

index a25dc32d51552b6a3b84fbecd95eac4d6197caaf..67aa63aa80a949da8a7e84761e61adfd55a01021 100644 (file)
@@ -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;
                }