From: Vsevolod Stakhov Date: Sun, 7 May 2017 12:25:31 +0000 (+0100) Subject: [Minor] Fix append HTTP header routine X-Git-Tag: 1.6.0~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9d0fa5e86db2f4470d34395a233b450478b2f60;p=thirdparty%2Frspamd.git [Minor] Fix append HTTP header routine --- diff --git a/src/libutil/http.c b/src/libutil/http.c index 8331b2406d..ab3c386dc0 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -2802,7 +2802,8 @@ rspamd_http_message_add_header_len (struct rspamd_http_message *msg, nlen = strlen (name); vlen = len; hdr->combined = rspamd_fstring_sized_new (nlen + vlen + 4); - rspamd_printf_fstring (&hdr->combined, "%s: %s\r\n", name, value); + rspamd_printf_fstring (&hdr->combined, "%s: %*s\r\n", name, (gint)nlen, + value); hdr->value = g_slice_alloc (sizeof (*hdr->value)); hdr->name = g_slice_alloc (sizeof (*hdr->name)); hdr->name->begin = hdr->combined->str;