aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 00:16:03 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 00:16:03 +0100
commit8883080e552074e30e3a6689a87a246b91f239cb (patch)
tree4d9e49558ae97145c68373eebcd005f58ed5a55a
parentd48900e14e41e1b767af6f8461105d5239c3c93e (diff)
downloadrspamd-8883080e552074e30e3a6689a87a246b91f239cb.tar.gz
rspamd-8883080e552074e30e3a6689a87a246b91f239cb.zip
Fix more fstring migration issues.
-rw-r--r--src/libmime/message.c2
-rw-r--r--src/libutil/http.c2
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 ();