From: Vsevolod Stakhov Date: Thu, 15 Oct 2015 23:16:03 +0000 (+0100) Subject: Fix more fstring migration issues. X-Git-Tag: 1.0.6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8883080e552074e30e3a6689a87a246b91f239cb;p=thirdparty%2Frspamd.git Fix more fstring migration issues. --- diff --git a/src/libmime/message.c b/src/libmime/message.c index e17d159f36..591107ba49 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 9c08f41f81..871718b745 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 ();