From 2a5c234d76490cd2793fc070dc66bb601b2fc9a2 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 12 Jun 2020 18:05:42 -0700 Subject: [PATCH] ircd::http: Assert supplied header string is terminated by caller. --- ircd/http.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ircd/http.cc b/ircd/http.cc index 0c224ac9a..1f332d738 100644 --- a/ircd/http.cc +++ b/ircd/http.cc @@ -524,6 +524,7 @@ ircd::http::response::response(window_buffer &out, if(!headers_s.empty()) out([&headers_s](const mutable_buffer &out) { + assert(endswith(headers_s, "\r\n")); return copy(out, headers_s); });