From c05a0eca86b2f65b03e71317100a4b41ac107d28 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 29 Jun 2023 11:13:48 +0200 Subject: [PATCH] xml_unquoted: fix bug with string of length 0 Ref #4922 --- repos/base/include/util/xml_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/base/include/util/xml_node.h b/repos/base/include/util/xml_node.h index 171e4d10d7..69fbd3c8b8 100644 --- a/repos/base/include/util/xml_node.h +++ b/repos/base/include/util/xml_node.h @@ -1070,7 +1070,7 @@ class Genode::Xml_unquoted : Noncopyable template Xml_unquoted(String const &string) - : _content_ptr({ string.string(), string.length() - 1}) + : _content_ptr({ string.string(), string.length() ? string.length() - 1 : 0 }) { } void print(Output &out) const