commit f66cd95: [Minor] Oops, fix starts_with

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Feb 7 15:14:14 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-02-07 13:56:07 +0000
URL: https://github.com/rspamd/rspamd/commit/f66cd95dcc349044bd989ee289e8f78a406e404d

[Minor] Oops, fix starts_with

---
 src/libutil/fstring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libutil/fstring.c b/src/libutil/fstring.c
index 967de9e98..b00b71e12 100644
--- a/src/libutil/fstring.c
+++ b/src/libutil/fstring.c
@@ -382,7 +382,7 @@ rspamd_ftok_starts_with (const rspamd_ftok_t *s1,
 	g_assert (s1 != NULL && s2 != NULL);
 
 	if (s1->len >= s2->len) {
-		return !!(memcmp (s1->begin, s2->begin, s1->len) == 0);
+		return !!(memcmp (s1->begin, s2->begin, s2->len) == 0);
 	}
 
 	return FALSE;


More information about the Commits mailing list