diff options
author | Alberto Ruiz <aruiz@gnome.org> | 2011-10-18 16:45:38 +0100 |
---|---|---|
committer | Alberto Ruiz <aruiz@gnome.org> | 2011-10-18 16:59:34 +0100 |
commit | b32019da6386ec3d72f3a064e8832cfb6ceee304 (patch) | |
tree | f49ce21c69c6e7b72bf9361fab2fae5e6264c2f9 /girepository | |
parent | 8e9aee93d024f40d6fa06a20583ac0b7cb845409 (diff) | |
download | gobject-introspection-b32019da6386ec3d72f3a064e8832cfb6ceee304.tar.gz |
parser: prevents a segfault when _g_ir_parser_parse_string returns NULL error was not set.
Noticed the segmentation fault while using Vala to generate a .gir, a bug has
been filed tomake sure Vala doesn't export gir symbols outside of a namespace
(see https://bugzilla.gnome.org/show_bug.cgi?id=661952)
https://bugzilla.gnome.org/show_bug.cgi?id=661951
Diffstat (limited to 'girepository')
-rw-r--r-- | girepository/girparser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c index 0a4a65d8..fd742f94 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -3502,6 +3502,11 @@ _g_ir_parser_parse_string (GIrParser *parser, if (ctx.modules) return ctx.modules->data; + + g_set_error (error, + G_MARKUP_ERROR, + G_MARKUP_ERROR_INVALID_CONTENT, + "Expected namespace element in the gir file"); return NULL; } |