Commit 17411e6b authored by louiz’'s avatar louiz’

Fix an use-after-free

Because we “delete all node” and then we use the content of one of these
nodes we got earlier.
parent 5b560078
......@@ -54,10 +54,11 @@ void HelloStep2(XmppComponent&, AdhocSession& session, XmlNode& command_node)
if (const XmlNode* value = name_field->get_child("value", "jabber:x:data"))
const std::string value_str = value->get_inner();
XmlSubNode note(command_node, "note");
note["type"] = "info";
note.set_inner("Hello "s + value->get_inner() + "!"s);
note.set_inner("Hello "s + value_str + "!"s);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment