]> git.sur5r.net Git - i3/i3/blobdiff - src/load_layout.c
tree_append_json: Allow strings that are not valid UTF8
[i3/i3] / src / load_layout.c
index 5f391ad727ed0da3f3811da91030d87293a813e8..d2ad4e87c9665c7173ea09086c484b2df3811dba 100644 (file)
@@ -611,6 +611,10 @@ void tree_append_json(Con *con, const char *buf, const size_t len, char **errorm
     yajl_config(hand, yajl_allow_comments, true);
     /* Allow multiple values, i.e. multiple nodes to attach */
     yajl_config(hand, yajl_allow_multiple_values, true);
+    /* Allow strings that are not valid UTF8. Could be possible if a container
+     * name contains such characters. If yajl stops parsing because of this, an
+     * in-place restart could fail: see #3156. */
+    yajl_config(hand, yajl_dont_validate_strings, true);
     json_node = con;
     to_focus = NULL;
     incomplete = 0;