From 2e0bfd98ff1be3025c8bf69cf8e2c639a6a4e045 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 17 Oct 2020 03:15:40 +0200 Subject: [PATCH] Fix tag extraction. Attempted to read deleted memory. --- src/cgi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cgi.cpp b/src/cgi.cpp index 5cbf192..6494693 100644 --- a/src/cgi.cpp +++ b/src/cgi.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include namespace FediBlock::cgi @@ -112,7 +113,7 @@ vector get_tags() cgi.getElement("tags[]", tags_form); for (const auto &element : tags_form) { - const string_view tag{element.getValue()}; + const string tag{element.getValue()}; if (!tag.empty()) { tags_string.push_back(tolower(tag));