From 8883080e552074e30e3a6689a87a246b91f239cb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 16 Oct 2015 00:16:03 +0100 Subject: [PATCH] Fix more fstring migration issues. --- src/libmime/message.c | 2 +- src/libutil/http.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libmime/message.c b/src/libmime/message.c index e17d159f3..591107ba4 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -1468,7 +1468,7 @@ rspamd_message_parse (struct rspamd_task *task) len = task->msg.len; /* Skip any space characters to avoid some bad messages to be unparsed */ - while (g_ascii_isspace (*p) && len > 0) { + while (len > 0 && g_ascii_isspace (*p)) { p ++; len --; } diff --git a/src/libutil/http.c b/src/libutil/http.c index 9c08f41f8..871718b74 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -604,7 +604,7 @@ rspamd_http_on_headers_complete (http_parser * parser) } if (parser->content_length != 0 && parser->content_length != ULLONG_MAX) { - priv->msg->body = rspamd_fstring_sized_new (parser->content_length + 1); + priv->msg->body = rspamd_fstring_sized_new (parser->content_length); } else { priv->msg->body = rspamd_fstring_new (); -- 2.39.5