commit 5c8b497: [Minor] Core: Fix length calculations
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Dec 27 18:28:10 UTC 2018
Author: Vsevolod Stakhov
Date: 2018-12-17 17:25:13 +0000
URL: https://github.com/rspamd/rspamd/commit/5c8b497d76a935153d92d509b14c90fdaa1a4577
[Minor] Core: Fix length calculations
---
src/libutil/str_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c
index 949bdd337..0c63edba2 100644
--- a/src/libutil/str_util.c
+++ b/src/libutil/str_util.c
@@ -935,7 +935,7 @@ rspamd_encode_qp_fold (const guchar *in, gsize inlen, gint str_len,
span += 3;
}
- if (str_len > 0 && span >= str_len) {
+ if (str_len > 0 && span + 3 >= str_len) {
if (how == RSPAMD_TASK_NEWLINES_CRLF) {
/* =\r\n */
olen += 3;
More information about the Commits
mailing list