mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +01:00 
			
		
		
		
	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
This commit is contained in:
		@@ -3502,6 +3502,11 @@ _g_ir_parser_parse_string (GIrParser           *parser,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (ctx.modules)
 | 
					  if (ctx.modules)
 | 
				
			||||||
    return ctx.modules->data;
 | 
					    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;
 | 
					  return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user