Skip to content

Commit

Permalink
[Minor] Core: Fix length calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Dec 17, 2018
1 parent 41022ef commit 5c8b497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libutil/str_util.c
Expand Up @@ -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;
Expand Down

0 comments on commit 5c8b497

Please sign in to comment.