projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51a72a9
)
buildertool: Fix a possible crash
author
Matthias Clasen
<mclasen@redhat.com>
Mon, 13 Dec 2021 18:52:50 +0000
(13:52 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Mon, 13 Dec 2021 18:52:50 +0000
(13:52 -0500)
We need to call g_markup_parse_context_end_parse
to catch incomplete documents that we might not
handle well later.
tools/gtk-builder-tool-simplify.c
patch
|
blob
|
history
diff --git
a/tools/gtk-builder-tool-simplify.c
b/tools/gtk-builder-tool-simplify.c
index dfa4eb70974734d2f0f88bc50e2231b1877e6c8e..404a38b2d7f97518f12b74009d7725c841cb3ecf 100644
(file)
--- a/
tools/gtk-builder-tool-simplify.c
+++ b/
tools/gtk-builder-tool-simplify.c
@@
-2295,6
+2295,12
@@
simplify_file (const char *filename,
return FALSE;
}
+ if (!g_markup_parse_context_end_parse (context, &error))
+ {
+ g_printerr (_("Can't parse ā%sā: %s\n"), filename, error->message);
+ return FALSE;
+ }
+
data.builder = gtk_builder_new ();
if (data.convert3to4)